Created
November 16, 2010 16:35
-
-
Save jferris/702033 to your computer and use it in GitHub Desktop.
Fixes allow rescue on Rails 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Also make sure that config.action_dispatch.show_exceptions is set to true in config/environments/test.rb | |
| class AllowRescue | |
| def initialize(app) | |
| @app = app | |
| end | |
| def call(env) | |
| env['action_dispatch.show_exceptions'] = !!ActionController::Base.allow_rescue | |
| @app.call(env) | |
| end | |
| end | |
| Capybara.app = AllowRescue.new(Capybara.app) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment