Is it possible to configure rails to show logger.debug messages (from logger.debug statements inside controllers) to display inside test.log (or to the console) when running unit and functional tests?
I added the following to test_helper.rb. I see messages from logger.debug statements directly inside tests but no messages from logger statements inside controller methods?
def logger
RAILS_DEFAULT_LOGGER
end
Works fine for me. Have you set your config.log_level to something specific?
Eitherway,
config.log_level = :debug
should work?
From Rails 3.2 upwards the method in test_helper.rb should look like this:
def logger
Rails.logger
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With