features/step_definitions/pickle_steps.rb in pickle-0.2.3 vs features/step_definitions/pickle_steps.rb in pickle-0.2.4

- old
+ new

@@ -25,11 +25,10 @@ find_model(name, fields).should be_nil end # find models with a table Then(/^the following #{capture_plural_factory} should exists?:?$/) do |plural_factory, table| - name = plural_factory.singularize - table.hashes.each { |hash| find_model!(name, hash)} + find_models_from_table(plural_factory, table) end # find exactly n models Then(/^(\d+) #{capture_plural_factory} should exist(?: with #{capture_fields})?$/) do |count, plural_factory, fields| find_models(plural_factory.singularize, fields).size.should == count.to_i