mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Reset ActiveRecord::Migration.message_count counter before start testing
This commit is contained in:
parent
17b837b3f1
commit
0cc22f4b86
1 changed files with 1 additions and 1 deletions
|
@ -24,6 +24,7 @@ class MigratorTest < ActiveRecord::TestCase
|
||||||
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
|
@verbose_was = ActiveRecord::Migration.verbose
|
||||||
|
ActiveRecord::Migration.message_count = 0
|
||||||
ActiveRecord::Migration.class_eval do
|
ActiveRecord::Migration.class_eval do
|
||||||
undef :puts
|
undef :puts
|
||||||
def puts(*)
|
def puts(*)
|
||||||
|
@ -243,7 +244,6 @@ class MigratorTest < ActiveRecord::TestCase
|
||||||
|
|
||||||
ActiveRecord::Migrator.new(:down, migrations, 0).migrate
|
ActiveRecord::Migrator.new(:down, migrations, 0).migrate
|
||||||
assert_not_equal 0, ActiveRecord::Migration.message_count
|
assert_not_equal 0, ActiveRecord::Migration.message_count
|
||||||
ActiveRecord::Migration.message_count = 0
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_migrator_verbosity_off
|
def test_migrator_verbosity_off
|
||||||
|
|
Loading…
Reference in a new issue