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

Don't allow AR::Tasks::DatabaseTasks.migrate to mutate Migration.verbose value

This fixes random test failure in migrator_test.rb
This commit is contained in:
Akira Matsuda 2014-08-30 02:28:44 +09:00
parent 4606e7527b
commit f8d9a51949

View file

@ -131,10 +131,12 @@ module ActiveRecord
verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
version = ENV["VERSION"] ? ENV["VERSION"].to_i : nil
scope = ENV['SCOPE']
Migration.verbose = verbose
verbose_was = Migration.verbose
Migrator.migrate(Migrator.migrations_paths, version) do |migration|
scope.blank? || scope == migration.scope
end
ensure
Migration.verbose = verbose_was
end
def charset_current(environment = env)