Sha256: 47194952f13f0f2a429400b47f42f29874f3fefef2c096072d557ea2aeff0fef

Contents?: true

Size: 436 Bytes

Versions: 2

Compression:

Stored size: 436 Bytes

Contents

# frozen_string_literal: true

ActionController::Base.class_eval do
  cattr_accessor :allow_rescue
end

module ActionDispatch
  class ShowExceptions
    alias __cucumber_orig_call__ call

    def call(env)
      env['action_dispatch.show_exceptions'] = !!ActionController::Base.allow_rescue
      env['action_dispatch.show_detailed_exceptions'] = !ActionController::Base.allow_rescue
      __cucumber_orig_call__(env)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cucumber-rails-2.0.0 lib/cucumber/rails/action_controller.rb
cucumber-rails-1.8.0 lib/cucumber/rails/action_controller.rb