diff --git a/spec/dummy/config/environments/test.rb b/spec/dummy/config/environments/test.rb index 240b92ec6..e6c2c78a3 100644 --- a/spec/dummy/config/environments/test.rb +++ b/spec/dummy/config/environments/test.rb @@ -23,7 +23,10 @@ config.action_controller.perform_caching = false # Raise exceptions instead of rendering exception templates - config.action_dispatch.show_exceptions = :none + # Rails 7.1 deprecated false in favor of :none, but we need to use false for + # backwards compatibility: https://github.com/rails/rails/pull/45867 + config.action_dispatch.show_exceptions = + Gem::Version.new(Rails.version) >= Gem::Version.new('7.1.0') ? :none : false # Disable request forgery protection in test environment config.action_controller.allow_forgery_protection = false