Skip to content

Commit

Permalink
Move config reset to ensure block
Browse files Browse the repository at this point in the history
We don't want to leak the extra migration path to other railties tests.
  • Loading branch information
pixeltrix committed Jan 17, 2017
1 parent 4965fc1 commit a0e0505
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion railties/test/generators/migration_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,9 @@ def test_add_migration_to_configured_path

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
Expand Down

0 comments on commit a0e0505

Please sign in to comment.