<commit_before>require 'spec_helper'

describe Pup do
  describe "should search a dog by breeds" do
    it "should find all dogs with a single breed and no second breed" do
      dog_1 = FactoryGirl.create(:pup, :breed_2 => 'poodle')
      dog_2 = FactoryGirl.create(:pup)
      dog_3 = FactoryGirl.create(:pup, :breed_2 => 'poodle')
      dog_4 = FactoryGirl.create(:pup, :breed_2 => 'German Short Hair')
      dog_5 = FactoryGirl.create(:pup)
      results = Pup.find_by_breeds('shiba inu')
      assert(results.member?(dog_2))
      assert(results.member?(dog_5))
      assert(!results.member?(dog_1))
      assert(!results.member?(dog_4))
      assert(!results.member?(dog_3))
    end
    it "should find all dogs with both breeds and not with only 1 of the breeds" do
      dog_1 = FactoryGirl.create(:pup, :breed_2 => 'poodle')
      dog_2 = FactoryGirl.create(:pup)
      dog_3 = FactoryGirl.create(:pup, :breed_2 => 'poodle')
      dog_4 = FactoryGirl.create(:pup, :breed_2 => 'German Short Hair')
      dog_5 = FactoryGirl.create(:pup)
      results = Pup.find_by_breeds('shiba inu', 'poodle')
      Rails.logger.info results
      assert(results.member? dog_1)
      assert(results.member? dog_3)
      assert(!results.member?(dog_2))
      assert(!results.member?(dog_4))
      assert(!results.member?(dog_5))
    end
  end
end<commit_msg>Done with find by breeds<commit_after>require 'spec_helper'

describe Pup do
  describe "should search a dog by breeds" do
    it "should find all dogs with a single breed and no second breed" do
      dog_1 = FactoryGirl.create(:pup, :breed_2 => 'poodle')
      dog_2 = FactoryGirl.create(:pup)
      dog_3 = FactoryGirl.create(:pup, :breed_2 => 'poodle')
      dog_4 = FactoryGirl.create(:pup, :breed_2 => 'German Short Hair')
      dog_5 = FactoryGirl.create(:pup)
      results = Pup.find_by_breeds('shiba inu')
      assert(results.member?(dog_2))
      assert(results.member?(dog_5))
      assert(!results.member?(dog_1))
      assert(!results.member?(dog_4))
      assert(!results.member?(dog_3))
    end
    it "should find all dogs with both breeds and not with only 1 of the breeds" do
      dog_1 = FactoryGirl.create(:pup, :breed_2 => 'poodle')
      dog_2 = FactoryGirl.create(:pup)
      dog_3 = FactoryGirl.create(:pup, :breed_2 => 'poodle')
      dog_4 = FactoryGirl.create(:pup, :breed_2 => 'German Short Hair')
      dog_5 = FactoryGirl.create(:pup)
      results = Pup.find_by_breeds('shiba inu', 'poodle')
      Rails.logger.info results
      assert(results.member? dog_1)
      assert(results.member? dog_3)
      assert(!results.member?(dog_2))
      assert(!results.member?(dog_4))
      assert(!results.member?(dog_5))
    end
  end
  describe "should find the average ratings for a dog breed" do
    it "should find the average ratings for a single breed dog" do

    end
    it "should find the average ratings for a mixed breed dog" do

    end
  end
end
{'fraction_non_alphanumeric': 0.12210095497953616, 'fraction_numerical': 0.018417462482946793, 'mean_word_length': 3.3451851851851853, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '5796291', 'n_tokens_mistral': 1018, 'n_tokens_neox': 996, 'n_words': 251}