aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorTobias Bielohlawek <tobias.bielohlawek@hitfoxgroup.com>2015-09-07 14:08:25 +0200
committerTobias Bielohlawek <tobias.bielohlawek@hitfoxgroup.com>2015-09-07 16:05:21 +0200
commit73726340c37f89ce8a58df0f8cec191b7e0dd067 (patch)
tree86b79fc215695a78213b738a5f5ef8c83e1ba69d /activerecord/test/cases
parent488afd5cc3a0d303b4b318938f2a13942d37d926 (diff)
downloadrails-73726340c37f89ce8a58df0f8cec191b7e0dd067.tar.gz
rails-73726340c37f89ce8a58df0f8cec191b7e0dd067.tar.bz2
rails-73726340c37f89ce8a58df0f8cec191b7e0dd067.zip
Allow global migrations_path configuration with using value from database_tasks instead of Migrator
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/tasks/database_tasks_test.rb4
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