Reset ActiveRecord::Migration.message_count counter before start testing

This commit is contained in:
Akira Matsuda 2014-08-29 10:36:27 +09:00
parent 17b837b3f1
commit 0cc22f4b86
1 changed files with 1 additions and 1 deletions

View File

@ -24,6 +24,7 @@ class MigratorTest < ActiveRecord::TestCase
ActiveRecord::SchemaMigration.create_table
ActiveRecord::SchemaMigration.delete_all rescue nil
@verbose_was = ActiveRecord::Migration.verbose
ActiveRecord::Migration.message_count = 0
ActiveRecord::Migration.class_eval do
undef :puts
def puts(*)
@ -243,7 +244,6 @@ class MigratorTest < ActiveRecord::TestCase
ActiveRecord::Migrator.new(:down, migrations, 0).migrate
assert_not_equal 0, ActiveRecord::Migration.message_count
ActiveRecord::Migration.message_count = 0
end
def test_migrator_verbosity_off