diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-09-07 16:13:47 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-09-07 16:23:42 +0200 |
commit | 8e155b0a9a4e387639be47d11e3a69c53ffb23ed (patch) | |
tree | a288ea7f6f16b5bceac781d1903c80f377f0fb33 /activerecord/test | |
parent | 488afd5cc3a0d303b4b318938f2a13942d37d926 (diff) | |
parent | 73726340c37f89ce8a58df0f8cec191b7e0dd067 (diff) | |
download | rails-8e155b0a9a4e387639be47d11e3a69c53ffb23ed.tar.gz rails-8e155b0a9a4e387639be47d11e3a69c53ffb23ed.tar.bz2 rails-8e155b0a9a4e387639be47d11e3a69c53ffb23ed.zip |
Merge pull request #21527 from rngtng/fix-migrator-path-setup
Use global migrations_path configuration in Migrator
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/tasks/database_tasks_test.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/cases/tasks/database_tasks_test.rb b/activerecord/test/cases/tasks/database_tasks_test.rb index 38164b2228..c8f4179313 100644 --- a/activerecord/test/cases/tasks/database_tasks_test.rb +++ b/activerecord/test/cases/tasks/database_tasks_test.rb @@ -277,12 +277,14 @@ module ActiveRecord def test_migrate_receives_correct_env_vars verbose, version = ENV['VERBOSE'], ENV['VERSION'] + ActiveRecord::Tasks::DatabaseTasks.migrations_paths = 'custom/path' ENV['VERBOSE'] = 'false' ENV['VERSION'] = '4' - ActiveRecord::Migrator.expects(:migrate).with(ActiveRecord::Migrator.migrations_paths, 4) + ActiveRecord::Migrator.expects(:migrate).with('custom/path', 4) ActiveRecord::Tasks::DatabaseTasks.migrate ensure + ActiveRecord::Tasks::DatabaseTasks.migrations_paths = nil ENV['VERBOSE'], ENV['VERSION'] = verbose, version end end |