diff --git a/test/rails_app/config/application.rb b/test/rails_app/config/application.rb index 1f4fbddba..f23b897ac 100644 --- a/test/rails_app/config/application.rb +++ b/test/rails_app/config/application.rb @@ -53,5 +53,9 @@ class Application < Rails::Application if Devise::Test.rails70? config.active_record.legacy_connection_handling = false end + + if Devise::Test.rails70_and_up? + config.active_support.cache_format_version = 7.0 + end end end diff --git a/test/rails_app/config/boot.rb b/test/rails_app/config/boot.rb index 4c108cc8c..80ebc818b 100644 --- a/test/rails_app/config/boot.rb +++ b/test/rails_app/config/boot.rb @@ -12,6 +12,10 @@ def self.rails71_and_up? !rails70? && Rails::VERSION::MAJOR >= 7 end + def self.rails70_and_up? + Rails::VERSION::MAJOR >= 7 + end + def self.rails70? Rails.version.start_with? '7.0' end