1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Move config reset to ensure block

We don't want to leak the extra migration path to other railties tests.
This commit is contained in:
Andrew White 2017-01-17 18:06:59 +00:00
parent a0e05057f8
commit 33eef3fc28

View file

@ -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