Skip to content

Instantly share code, notes, and snippets.

@notahat
Created May 24, 2011 01:58
Show Gist options
  • Save notahat/988024 to your computer and use it in GitHub Desktop.
Save notahat/988024 to your computer and use it in GitHub Desktop.
Make RSpec and Capybara give backtraces for controller exceptions
# Put this in spec/support
# Make sure we get stack traces for controller and view exceptions.
ActionController::Base.class_eval do
def rescue_action_without_handler(exception)
raise exception
end
end
@joevandyk
Copy link

doesn't work for me :(

@notahat
Copy link
Author

notahat commented Nov 2, 2011

With which Rails version? This was written against 2.3.something-old.

@joevandyk
Copy link

joevandyk commented Nov 2, 2011 via email

@notahat
Copy link
Author

notahat commented Nov 2, 2011

Yeah, definitely not going to work on 3. The architecture for exception handling in controllers has changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment