Skip to content

Commit

Permalink
Fix test warning about deprecated cache format in Rails 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosantoniodasilva committed Oct 10, 2023
1 parent f2a42ab commit 407f223
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/rails_app/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions test/rails_app/config/boot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 407f223

Please sign in to comment.