Skip to content

Commit

Permalink
Suporting should not exists for tables
Browse files Browse the repository at this point in the history
  • Loading branch information
p13rr3-yv3s committed May 25, 2014
1 parent cd372e2 commit b150a55
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rails_generators/pickle/templates/pickle_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
find_models_from_table(plural_factory, table).should_not be_any(&:nil?)
end

# not find models with a table
Then(/^the following #{capture_plural_factory} should not exists?:?$/) do |plural_factory, table|
find_models_from_table(plural_factory, table).should_not be_nil
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
Expand Down

0 comments on commit b150a55

Please sign in to comment.