提交 974a6402 编写于 作者: A Aaron Patterson

moving logger test to its own file

上级 bc276fbc
require "cases/helper"
module ActiveRecord
class Migration
class LoggerTest < ActiveRecord::TestCase
def test_migration_should_be_run_without_logger
previous_logger = ActiveRecord::Base.logger
ActiveRecord::Base.logger = nil
assert_nothing_raised do
ActiveRecord::Migrator.migrate(MIGRATIONS_ROOT + "/valid")
end
ensure
ActiveRecord::Base.logger = previous_logger
end
end
end
end
......@@ -1238,19 +1238,6 @@ def with_env_tz(new_tz = 'US/Eastern')
ensure
old_tz ? ENV['TZ'] = old_tz : ENV.delete('TZ')
end
end
class MigrationLoggerTest < ActiveRecord::TestCase
def test_migration_should_be_run_without_logger
previous_logger = ActiveRecord::Base.logger
ActiveRecord::Base.logger = nil
assert_nothing_raised do
ActiveRecord::Migrator.migrate(MIGRATIONS_ROOT + "/valid")
end
ensure
ActiveRecord::Base.logger = previous_logger
end
end
class InterleavedMigrationsTest < ActiveRecord::TestCase
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册