[rspec-users] Cucumber Custom Logging

James Byrne lists at ruby-forum.com
Mon Nov 24 16:26:27 EST 2008

Joseph Wilk wrote:
> 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.

I experimented with the following code in env.rb, borrowing heavily from 
the discussion on ticker 44 and this is what happened:

Before do |scenario|
  logger.info("Running Scenario: #{scenario}")

  Scenario: Record Entity basic identification information  # 
`call_in': expected 1 block argument(s), got 0 

Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list