aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorAndrew White <andrew.white@unboxed.co>2017-01-17 18:06:59 +0000
committerAndrew White <andrew.white@unboxed.co>2017-01-17 18:06:59 +0000
commit33eef3fc28fe0dd727738639a64233619e0bb9b0 (patch)
treed787937cd4e4395a442a502b2da68aabb42c1c28 /railties
parenta0e05057f865ec9c6b748cf8c97caa70a3d4cdc6 (diff)
downloadrails-33eef3fc28fe0dd727738639a64233619e0bb9b0.tar.gz
rails-33eef3fc28fe0dd727738639a64233619e0bb9b0.tar.bz2
rails-33eef3fc28fe0dd727738639a64233619e0bb9b0.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/model_generator_test.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/test/generators/model_generator_test.rb b/railties/test/generators/model_generator_test.rb
index 0c445729f5..99490af3a9 100644
--- a/railties/test/generators/model_generator_test.rb
+++ b/railties/test/generators/model_generator_test.rb
@@ -226,8 +226,9 @@ class ModelGeneratorTest < Rails::Generators::TestCase
run_generator
- Rails.application.config.paths["db/migrate"] = old_paths
assert_migration "db2/migrate/create_accounts.rb", /class CreateAccounts < ActiveRecord::Migration\[[0-9.]+\]/
+ ensure
+ Rails.application.config.paths["db/migrate"] = old_paths
end
def test_model_with_references_attribute_generates_belongs_to_associations