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 steps_for(:my)
  Before do
    # This block will run before all scenarios that use steps from MySteps
    # Any scenarios not using any of these will not have this block run
  end

  Given /bla bla/ do
  end
end

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.

Thanks

--
Jim Morris, http://blog.wolfman.com
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to