[rspec-users] Documentation for Plain-Text Stories
aslak.hellesoy at gmail.com
Wed Aug 20 02:20:07 EDT 2008
On Aug 20, 2008, at 7:04 AM, Jim Morris wrote:
> Aslak Hellesøy wrote:
>> Right now the scope of Before/After is global - i.e. all Before and
>> After blocks will run before and after each scenario. I have
>> deliberately postponed adding scoping of this until I better
>> understand how people want to define this scoping.
>> Here is one ideas:
>> class MySteps < Cucumber::Steps # Same as Story runnner
>> Before do
>> # This block will run before all scenarios that use steps from
>> # Any scenarios not using any of these will not have this block
>> Given /bla bla/ do
>> I'm open to other ideas too.
> I'd like to have a before story and after story as well as a before
> scenario and after scenario.
> Right now I do global setup for a story, and cleanup when the story
> is done. I also do a setup before each scenario as well.
> It would be nice to have the ability to do both.
Can you give me a code example? (In Cucumber it's Feature, not Story)
> Jim Morris, http://blog.wolfman.com
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users