Skip to content

Commit

Permalink
Address deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
yuki24 committed Jan 4, 2024
1 parent 86e5212 commit 63b8297
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/rambulance/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ def with_exceptions_app(enabled: true)
org_show_exceptions = Rails.application.env_config['action_dispatch.show_exceptions']

Rails.application.env_config['action_dispatch.show_detailed_exceptions'] = !enabled
Rails.application.env_config['action_dispatch.show_exceptions'] = enabled

if ActionDispatch::ExceptionWrapper.instance_methods.include?(:show?)
Rails.application.env_config['action_dispatch.show_exceptions'] = enabled ? :all : :none
else
Rails.application.env_config['action_dispatch.show_exceptions'] = enabled
end

yield
ensure
Expand All @@ -37,4 +42,3 @@ def with_exceptions_app(enabled: true)
end
end
end

0 comments on commit 63b8297

Please sign in to comment.