Sha256: 9c55b35167c59dc51106ba9420a0c995ddf511a503496edeeb7ae7281e1aa05f

Contents?: true

Size: 558 Bytes

Versions: 9

Compression:

Stored size: 558 Bytes

Contents

# frozen_string_literal: true

ActionController::Base.class_eval do
  cattr_accessor :allow_rescue
end

module Cucumber
  module Rails
    module ActionDispatch
      module ShowExceptions
        def call(env)
          env['action_dispatch.show_detailed_exceptions'] = !ActionController::Base.allow_rescue
          env['action_dispatch.show_exceptions'] = !env['action_dispatch.show_detailed_exceptions']
          super(env)
        end
      end
    end
  end
end

ActionDispatch::ShowExceptions.prepend(Cucumber::Rails::ActionDispatch::ShowExceptions)

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cucumber-rails-3.0.0.rc.1 lib/cucumber/rails/action_dispatch.rb
cucumber-rails-2.6.1 lib/cucumber/rails/action_dispatch.rb
cucumber-rails-2.6.0 lib/cucumber/rails/action_dispatch.rb
cucumber-rails-2.5.1 lib/cucumber/rails/action_dispatch.rb
cucumber-rails-2.5.0 lib/cucumber/rails/action_dispatch.rb
cucumber-rails-2.4.0 lib/cucumber/rails/action_dispatch.rb
cucumber-rails-2.3.0 lib/cucumber/rails/action_dispatch.rb
cucumber-rails-2.2.0 lib/cucumber/rails/action_dispatch.rb
cucumber-rails-2.1.0 lib/cucumber/rails/action_dispatch.rb