Skip to content

Commit

Permalink
Set default db for tests in Rails 7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
djmb committed Feb 2, 2024
1 parent 5b2452e commit c34e3f3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@

ActiveSupport::TestCase.use_transactional_tests = false

if Rails::VERSION::MAJOR == 7 && Rails::VERSION::MINOR == 0 && SolidCache.configuration.connects_to
SolidCache::Record.connecting_to(shard: SolidCache.configuration.shard_keys.first || :default)
end

class ActiveSupport::TestCase
setup do
@all_stores = []
Expand Down

0 comments on commit c34e3f3

Please sign in to comment.