Rails' logs contain valuable information. You’ve probably seen output like the following:
In my case, I ran
script/server. If you’re running Passenger, you might run:
tail -f log/development.log
Tail your test log
If I do not understand a functional test failure, I run my tests in one shell and tail my test log in another. Usually, I’m checking to make sure the params are correct.
tail -f log/test.log
Tail your Cucumber log
Cucumber is pretty cool. One downside is lack of information in the backtrace. You can find out more by tailing the log!
tail -f log/cucumber.log
There’s a lot going on, isn’t there
Watching test logs, especially in the Test::Unit/Shoulda world, reminds me:
- how much of the stack gets executed in functional tests
- the quieting, focusing effect that stubbing and spying can have
- stubbing and spying aren’t enough when you have to worry about what is happening in the view during your functional tests