[rspec-users] Cucumber: Before(:all)

Aslak Hellesøy aslak.hellesoy at gmail.com
Tue Sep 2 12:36:32 EDT 2008

> Hi,
>> , aslak hellesoy wrote (sometime today):
>> at_exit do
>>   ..
>> end
> If I had a number of steps, stories and runners where would I put the
> kernal at_exit method?
> At the last 'Then' in a step file?

No, never inside a step. You should only register each at_exit hook  

> At the bottom of that particular
> runner file? I assume there would be

Not sure what you mean by runner file. Stick the global setup code and  
at_exit hook(s) at the top level in a ruby file inside your steps  
folder. This file shouldn't contain any step defs.


> numerous at_exit methods i.e.
> different teardowns.
> Cheers
> Aidy
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list