Rails 3.0.10, Ruby 1.9.2, ActiveSupport::TestCase
I would like to print to STDOUT the log portion of tests that fail (only). If there is a plugin for that that I didn't find, please be so kind to tell me. Otherwise, I would like to know:
- How do I get the result (pass, fail, error) in teardown? In a similar question it is suggested to overwrite all assert methods to rescue exceptions, but I don't like that approach too much.
My approach would be to have a setup that changes logging to a string and have the string pumped to STDOUT on a fail.