[rspec-users] Before and After blocks for individual feature files?
akleak at gmail.com
Tue Apr 28 11:32:04 EDT 2009
I also would like a hook that executes a block once before running a
In my testing i found that:
- Background: executes before each scenario
- Before executes before each scenario
- Before('@tag') executes before each scenario
Is there a way to execute a block once before each feature, but not
before each scenario?
On Apr 28, 7:08 am, aslak hellesoy <aslak.helle... at gmail.com> wrote:
> > Hi -- is it possible to set before and after blocks for individual feature
> > files?
> Yes. Use tagged hooks:http://wiki.github.com/aslakhellesoy/cucumber/hooks
> > I've tried putting them in step files, but they just get called before
> > everything, like they'd been declared in env.rb, which is consistent with
> > how I thought cucumber worked, but I thought I'd best try it anyway.
> > Anyway, I have some features that require a specific state be set up before
> > they run -- is this possible to do, and how would I go about doing it?
> > Thanks for any & all help,
> > Doug.
> > _______________________________________________
> > rspec-users mailing list
> > rspec-us... at rubyforge.org
> rspec-users mailing list
> rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
More information about the rspec-users