diff --git a/spec/unit_spec_helper.rb b/spec/unit_spec_helper.rb index 81f8cec7a..83fc24fcc 100644 --- a/spec/unit_spec_helper.rb +++ b/spec/unit_spec_helper.rb @@ -32,7 +32,11 @@ end end -ActiveSupport::Deprecation.behavior = :stderr +if Rails::VERSION::STRING >= '7.2' + Rails.application.deprecators.behavior = :stderr +else + ActiveSupport::Deprecation.behavior = :stderr +end Shoulda::Matchers.configure do |config| config.integrate do |with|