From 3cb6a2617bc6a5e19ebe49d15d51482bb4e68e24 Mon Sep 17 00:00:00 2001 From: Carlos Chitty Date: Tue, 29 Apr 2025 15:19:40 -0400 Subject: [PATCH] Do not fail tests on deprecation warnings for the next rails version (7.2) --- config/environments/test.rb | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/config/environments/test.rb b/config/environments/test.rb index 2e14aea9c3..abda6964d9 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -54,15 +54,5 @@ Openfoodnetwork::Application.configure do # Print deprecation notices to the stderr # config.active_support.deprecation = :stderr - # Fail tests on deprecated code unless it's a known case to solve. - ActiveSupport::Deprecation.behavior = ->(message, callstack, deprecation_horizon, gem_name) do - allowed_warnings = [ - # List strings here to allow matching deprecations. - ] - unless allowed_warnings.any? { |pattern| message.match(pattern) } - ActiveSupport::Deprecation::DEFAULT_BEHAVIORS[:raise].call(message, callstack, deprecation_horizon, gem_name) - end - end - config.active_job.queue_adapter = :test end