diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-09-29 09:25:59 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-09-29 09:25:59 +0900 |
commit | 445a74e1a953c0b0bddf51b69865d43cce6ea859 (patch) | |
tree | 967c87d767dc36d23b514a0d5432032374f51dad /railties/test | |
parent | 3727215591dfe1320233d3800b16a7fa455595ae (diff) | |
download | rails-445a74e1a953c0b0bddf51b69865d43cce6ea859.tar.gz rails-445a74e1a953c0b0bddf51b69865d43cce6ea859.tar.bz2 rails-445a74e1a953c0b0bddf51b69865d43cce6ea859.zip |
Reset `ActiveRecord::Base.configurations` to the value before
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/generators_test_helper.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/test/generators/generators_test_helper.rb b/railties/test/generators/generators_test_helper.rb index 355d4b09a8..25d5dba1d8 100644 --- a/railties/test/generators/generators_test_helper.rb +++ b/railties/test/generators/generators_test_helper.rb @@ -43,6 +43,7 @@ module GeneratorsTestHelper end def with_secondary_database_configuration + original_configurations = ActiveRecord::Base.configurations ActiveRecord::Base.configurations = { test: { secondary: { @@ -53,7 +54,7 @@ module GeneratorsTestHelper } yield ensure - ActiveRecord::Base.configurations = {} + ActiveRecord::Base.configurations = original_configurations end def copy_routes |