[Rails3] Displaying the full stack trace for test errors?

I’m porting an app from 2.3 to 3.0, have errors in my test suite, and
don’t get enough info to figure out where these occur. See the example
below; that’s all the feedback I get for an exception raised in a
view.

Suggestions on how I revert to the 2.x behaviour?


  1. Error:
    test_should_show_pet(PetsControllerTest):
    ActionView::Template::Error: undefined method `name’ for nil:NilClass

Isak

One way to do this is to export the BACKTRACE environment variable in
the shell executing your Rails 3.0 unit or functional tests: e.g.

BACKTRACE=blegga ruby test/unit/my_unit_test.rb

(setting the BACKTRACE environment variable suppresses the Rails
backtrace filter – see also test_help.rb in railties)

Peter