Do not fail tests on deprecation warnings for the next rails version (7.2)

This commit is contained in:
Carlos Chitty
2025-04-29 15:19:40 -04:00
committed by Filipe
parent 420deca437
commit 3cb6a2617b

View File

@@ -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