#5 new
Nicholas Rutherford

Add ability for pickle models to be referenced without using factory name

Reported by Nicholas Rutherford | October 29th, 2009 @ 08:14 PM

find a model

Then(/^#{capture_model} should exist(?: with #{capture_fields})?$/) do |name, fields|
  find_model(name, fields).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
end

make it so this can handle

And 1 service should exist

can just add (?:\d+)? to the start of the singular model assert?

instead of

And 1 services should exist

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Assign tickets to <b>Ian White</b>, so I get notified

Pages