>I gather that before / after block only work within 
>step files? If so then that requires each step file be modified to turn 
>custom logging on or off, which is something I would much rather avoid.

I don't think this is the case. Every Before/After that is in a required 
file is run before a scenario. So in theory you could create one Before 
(in for example env.rb) which would get called for all scenarios.

As for steps well, that sounds a lot trickier. I cannot think of a clean 
way to get at that.

If you want steps now in a clean way I would suggest looking at making a 
custom formatter. Cucumber supports multiple formatters so you could run 
your rails logging formatter with other formatters. Bundle this up in a 
--profile to save typing long command line args. The formatter knows 
when every scenario is executed and when every step passes/fails/skips 
etc.

If you look at the progress formatter in cucumber it should be a good 
start for you.

HTH,
--
Joseph Wilk
http://blog.josephwilk.net
-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to