mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Reset ActiveRecord::Migration.verbose to the value before
This commit is contained in:
parent
19cdec3da8
commit
fb7eecad30
2 changed files with 5 additions and 2 deletions
|
@ -34,7 +34,7 @@ class MigrationTest < ActiveRecord::TestCase
|
||||||
Reminder.connection.drop_table(table) rescue nil
|
Reminder.connection.drop_table(table) rescue nil
|
||||||
end
|
end
|
||||||
Reminder.reset_column_information
|
Reminder.reset_column_information
|
||||||
ActiveRecord::Migration.verbose = true
|
@verbose_was, ActiveRecord::Migration.verbose = ActiveRecord::Migration.verbose, true
|
||||||
ActiveRecord::Migration.message_count = 0
|
ActiveRecord::Migration.message_count = 0
|
||||||
ActiveRecord::Base.connection.schema_cache.clear!
|
ActiveRecord::Base.connection.schema_cache.clear!
|
||||||
end
|
end
|
||||||
|
@ -65,6 +65,8 @@ class MigrationTest < ActiveRecord::TestCase
|
||||||
Person.connection.remove_column("people", "middle_name") rescue nil
|
Person.connection.remove_column("people", "middle_name") rescue nil
|
||||||
Person.connection.add_column("people", "first_name", :string)
|
Person.connection.add_column("people", "first_name", :string)
|
||||||
Person.reset_column_information
|
Person.reset_column_information
|
||||||
|
|
||||||
|
ActiveRecord::Migration.verbose = @verbose_was
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_migrator_versions
|
def test_migrator_versions
|
||||||
|
|
|
@ -23,11 +23,12 @@ class MigratorTest < ActiveRecord::TestCase
|
||||||
super
|
super
|
||||||
ActiveRecord::SchemaMigration.create_table
|
ActiveRecord::SchemaMigration.create_table
|
||||||
ActiveRecord::SchemaMigration.delete_all rescue nil
|
ActiveRecord::SchemaMigration.delete_all rescue nil
|
||||||
|
@verbose_was = ActiveRecord::Migration.verbose
|
||||||
end
|
end
|
||||||
|
|
||||||
teardown do
|
teardown do
|
||||||
ActiveRecord::SchemaMigration.delete_all rescue nil
|
ActiveRecord::SchemaMigration.delete_all rescue nil
|
||||||
ActiveRecord::Migration.verbose = true
|
ActiveRecord::Migration.verbose = @verbose_was
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_migrator_with_duplicate_names
|
def test_migrator_with_duplicate_names
|
||||||
|
|
Loading…
Reference in a new issue