On Jul 3, 2008, at 11:57 AM, David Salgado wrote:

Hi All

Is there a way to have "pre-requisite" story scenarios, and include them using GivenScenario in a different story file?

i.e. I'd like to have a file "prereqs.story", with "Scenario: A common setup", and then in "somestuff.story" have "GivenScenario: A common setup...", and have the scenario go on from there.

Unless you're looking for the steps to show up when you run things, why not just have a helper method that does the setup for you and then have a Given step that invokes that method?

I know I can extract logic into steps, but I'd like the pre- requisite scenarios to have some assertions, and it doesn't feel right to put assertions in steps (if that's possible).

I'm not sure understand this. Don't you have expectations (assertions) in all your Then steps?

David

I've had a dig through the rdoc and the source, and I couldn't figure out whether it could be done, or how to do it. Is this kind of thing possible and/or sensible?

Many thanks

David


_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to