<commit_before>require 'spec_helper'

describe PupsController do
  describe "looking at all pups" do
    it "should get all of the dogs" do
      Pup.should_receive(:all)
      get :index
      response.should render_template 'index'
    end
  end
  describe "serving new pup page" do
    it "should get all of the breeds for the page" do
      Pup.should_receive(:all_breeds).and_return([])
      Pup.should_receive(:all_breeds_none).and_return([])
      Breeder.should_receive(:all).and_return([])
      get :main
    end
  end
  describe "looking at a single pup review" do
    it "should find the pup" do
      temp_pup = FactoryGirl.build(:pup)
      Pup.should_receive(:find).with('1').and_return(temp_pup)
      get :show, :id => 1
    end
  end
  describe "creating a pup review" do
    it "should create the pup and redirect to all pups" do
      temp_pup = FactoryGirl.build(:pup)
      Pup.should_receive(:create!).with(nil).and_return(temp_pup)
      post :create, {}
    end
  end
  describe "updating a review" do
    it "should find the pup and update it's attributes" do
      temp_pup = FactoryGirl.build(:pup)
      Pup.should_receive(:find).with('1').and_return(temp_pup)
      temp_pup.should_receive(:update_attributes).with({})
      put :update, {:id => 1, :pup => {}}
      response.should redirect_to pups_path
    end
  end<commit_msg>Get 100% in pups_controller<commit_after>require 'spec_helper'

describe PupsController do
  describe "looking at all pups" do
    it "should get all of the dogs" do
      Pup.should_receive(:all)
      get :index
      response.should render_template 'index'
    end
  end
  describe "page for submitting new review" do
    it "should get all of the breeds for the page" do
      Pup.should_receive(:all_breeds).and_return([])
      Pup.should_receive(:all_breeds_none).and_return([])
      get :new
    end
  end
  describe "serving main page" do
    it "should get all of the breeds for the page" do
      Pup.should_receive(:all_breeds).and_return([])
      Pup.should_receive(:all_breeds_none).and_return([])
      Breeder.should_receive(:all).and_return([])
      get :main
    end
  end
  describe "looking at a single pup review" do
    it "should find the pup" do
      temp_pup = FactoryGirl.build(:pup)
      Pup.should_receive(:find).with('1').and_return(temp_pup)
      get :show, :id => 1
    end
  end
  describe "creating a pup review" do
    it "should create the pup and redirect to all pups" do
      temp_pup = FactoryGirl.build(:pup)
      Pup.should_receive(:create!).with(nil).and_return(temp_pup)
      post :create, {}
    end
  end
  describe "updating a review" do
    it "should find the pup and update it's attributes" do
      temp_pup = FactoryGirl.build(:pup)
      Pup.should_receive(:find).with('1').and_return(temp_pup)
      temp_pup.should_receive(:update_attributes).with({})
      put :update, {:id => 1, :pup => {}}
      response.should redirect_to pups_path
    end
  end
{'fraction_non_alphanumeric': 0.10490921318090114, 'fraction_numerical': 0.003698722259583053, 'mean_word_length': 3.1725105189340814, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6258245', 'n_tokens_mistral': 1015, 'n_tokens_neox': 967, 'n_words': 279}