diff options
| author | mo khan <mo@mokhan.ca> | 2013-07-19 23:13:10 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2013-07-19 23:13:10 -0600 |
| commit | de001277b32fe5ae843b34b79974915508d23e61 (patch) | |
| tree | db4588746ba54ea5e50ce7c5cc5000c08dc12779 | |
| parent | 497f3ef1eaff8fc9ac66004d15c92310a2532eb2 (diff) | |
fix broken spec
| -rw-r--r-- | spec/integration/orm/mappings/product_mapping_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/integration/orm/mappings/product_mapping_spec.rb b/spec/integration/orm/mappings/product_mapping_spec.rb index 4480638..ef6ad38 100644 --- a/spec/integration/orm/mappings/product_mapping_spec.rb +++ b/spec/integration/orm/mappings/product_mapping_spec.rb @@ -3,12 +3,18 @@ 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) } @@ -16,5 +22,9 @@ describe "Product Mapping" do 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 |
