Sha256: 8189e0b9c2437d2af15d7390028dcff49596d9febd290eb0d4fa4241fdf134c8
Contents?: true
Size: 825 Bytes
Versions: 4
Compression:
Stored size: 825 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 show_exceptions = !env['action_dispatch.show_detailed_exceptions'] if ::Rails.gem_version >= Gem::Version.new('7.1.0') # Rails 7.1 deprecated `show_exceptions` boolean in in favor of symbols show_exceptions = show_exceptions ? :all : :none end env['action_dispatch.show_exceptions'] = show_exceptions super(env) end end end end end ActionDispatch::ShowExceptions.prepend(Cucumber::Rails::ActionDispatch::ShowExceptions)
Version data entries
4 entries across 4 versions & 1 rubygems