class ActiveRecord::Migration::LoggerTest
Constants
- Migration
Public Instance Methods
setup()
click to toggle source
Calls superclass method
# File activerecord/test/cases/migration/logger_test.rb, line 18 def setup super ActiveRecord::SchemaMigration.create_table ActiveRecord::SchemaMigration.delete_all end
test_migration_should_be_run_without_logger()
click to toggle source
# File activerecord/test/cases/migration/logger_test.rb, line 28 def test_migration_should_be_run_without_logger previous_logger = ActiveRecord::Base.logger ActiveRecord::Base.logger = nil migrations = [Migration.new("a", 1), Migration.new("b", 2), Migration.new("c", 3)] ActiveRecord::Migrator.new(:up, migrations).migrate ensure ActiveRecord::Base.logger = previous_logger end