From 45827cb0716fb4dd8fbac94e89224ff47abfdcdb Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Tue, 8 Nov 2022 15:17:40 -0800 Subject: [PATCH] Fixed test warning with Active Record 7.1 --- test/multiple_databases_test.rb | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/test/multiple_databases_test.rb b/test/multiple_databases_test.rb index 72a2ad6d..278b7def 100644 --- a/test/multiple_databases_test.rb +++ b/test/multiple_databases_test.rb @@ -48,21 +48,15 @@ def with_multiple_dbs(&block) multi_db_config = { "test" => { - "primary" => { - "adapter" => $adapter, - "database" => "strong_migrations_test" - }, - "animals" => { - "adapter" => $adapter, - "database" => "animals_test" - } + "primary" => previous_db_config, + "animals" => previous_db_config } } ActiveRecord::Base.configurations = multi_db_config ActiveRecord::Base.connects_to(database: {writing: :primary}) yield ensure - ActiveRecord::Base.establish_connection(previous_db_config) + ActiveRecord::Base.establish_connection(previous_db_config) if previous_db_config end def multiple_dbs?