aboutsummaryrefslogblamecommitdiffstats
path: root/activerecord/test/cases/migration/logger_test.rb
blob: a892afda919830ea49efceb9b4818fdcff81b1f5 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                                    
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