Skip to content

Instantly share code, notes, and snippets.

@jferris
Created November 16, 2010 16:35
Show Gist options
  • Select an option

  • Save jferris/702033 to your computer and use it in GitHub Desktop.

Select an option

Save jferris/702033 to your computer and use it in GitHub Desktop.
Fixes allow rescue on Rails 3
# 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