mdgnkm mdgnkm - 1 year ago 149
Ruby Question

How do you log to the Rails log file in Cucumber?

Is there a way to log to the test.log file in Cucumber for Rails?

Using cucumber 1.3.15, cucumber-rails 1.4.1, and rails 4.0.3

Answer Source

Rails.logger works just fine in step definitions, e.g.

Given /^I log on to the Internet$/ do "Logging on ..."
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download