On Fri, Dec 5, 2008 at 8:16 PM, Mark Wilden <[EMAIL PROTECTED]> wrote: > Can you have an And step in a feature? With this, I get a NoMethodError for > 'And': > > Given /a company named (.+)/ do |name| > @company = Company.create!(:name => name) > end > > And /a user named (.+)/ do |name| > @user = create_user name > end > > I'm probably missing something really obvious.
And is something the grammar allows in scenarios, but it always maps And (and But) to the last type of Given, When or Then. So what you really have here is a Given step that you are invoking with an alias, And, from the Scenario. Cheers, David > > ///ark > > > _______________________________________________ > rspec-users mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
