<commit_before>require "spec_helper"

describe "Product Mapping" do
  context "finding all products" do
    let(:product) { Product.new(:name => 'book') }
    before :each do
      connection_string = DatabaseConfiguration.new.connection_string
      configuration = Humble::Configuration.new(connection_string)
      configuration.add(ProductMapping.new)
      session_factory = configuration.build_session_factory
      @session = session_factory.create_session
    end

    let(:results) { @session.find_all(Product) }

    it "should be able to load all Products" do
      results.should include(product)
    end
  end
end<commit_msg>fix broken spec<commit_after>require "spec_helper"

describe "Product Mapping" do
  context "finding all products" do
    let(:product) { Product.new(:name => 'book') }

    before :each do
      connection_string = DatabaseConfiguration.new.connection_string
      configuration = Humble::Configuration.new(connection_string)
      configuration.add(ProductMapping.new)
      session_factory = configuration.build_session_factory
      @session = session_factory.create_session
      @session.save(product)
    end

    after :each do
      TestDatabaseGateway.delete_all
    end

    let(:results) { @session.find_all(Product) }

    it "should be able to load all Products" do
      results.should include(product)
    end

    it "should return the correct number of results" do
      results.count.should == 1
    end
  end
end
{'fraction_non_alphanumeric': 0.08299319727891157, 'fraction_numerical': 0.0006802721088435374, 'mean_word_length': 3.6112852664576804, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6609594', 'n_tokens_mistral': 407, 'n_tokens_neox': 395, 'n_words': 105}