diff options
author | Andrew White <andrew.white@unboxed.co> | 2017-01-17 17:23:55 +0000 |
---|---|---|
committer | Andrew White <andrew.white@unboxed.co> | 2017-01-17 17:23:55 +0000 |
commit | a0e05057f865ec9c6b748cf8c97caa70a3d4cdc6 (patch) | |
tree | 13fdbe5cf0fd604f3ad698edf082d6591a0c2068 /railties | |
parent | 4965fc124914c0bede4878709097bc1128cc0dea (diff) | |
download | rails-a0e05057f865ec9c6b748cf8c97caa70a3d4cdc6.tar.gz rails-a0e05057f865ec9c6b748cf8c97caa70a3d4cdc6.tar.bz2 rails-a0e05057f865ec9c6b748cf8c97caa70a3d4cdc6.zip |
Move config reset to ensure block
We don't want to leak the extra migration path to other railties tests.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/generators/migration_generator_test.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/test/generators/migration_generator_test.rb b/railties/test/generators/migration_generator_test.rb index 5ad4372833..f46278cefe 100644 --- a/railties/test/generators/migration_generator_test.rb +++ b/railties/test/generators/migration_generator_test.rb @@ -315,8 +315,9 @@ class MigrationGeneratorTest < Rails::Generators::TestCase migration = "migration_in_custom_path" run_generator [migration] - Rails.application.config.paths["db/migrate"] = old_paths assert_migration "db2/migrate/#{migration}.rb", /.*/ + ensure + Rails.application.config.paths["db/migrate"] = old_paths end private |