Skip to content
Browse files

Merge pull request #4078 from Karunakar/fix_failing_test

remove more uses of deprecated loggers
  • Loading branch information...
2 parents d4f5398 + c056787 commit 635080f33cdcbfb5a8dd85830eaef85f1555d93c @josevalim josevalim committed Dec 20, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/test/cases/base_test.rb
View
4 activerecord/test/cases/base_test.rb
@@ -1914,7 +1914,7 @@ def test_silence_sets_log_level_back_to_level_before_yield
def test_benchmark_with_log_level
original_logger = ActiveRecord::Base.logger
log = StringIO.new
- ActiveRecord::Base.logger = Logger.new(log)
+ ActiveRecord::Base.logger = ActiveSupport::Logger.new(log)
ActiveRecord::Base.logger.level = Logger::WARN
ActiveRecord::Base.benchmark("Debug Topic Count", :level => :debug) { Topic.count }
ActiveRecord::Base.benchmark("Warn Topic Count", :level => :warn) { Topic.count }
@@ -1929,7 +1929,7 @@ def test_benchmark_with_log_level
def test_benchmark_with_use_silence
original_logger = ActiveRecord::Base.logger
log = StringIO.new
- ActiveRecord::Base.logger = Logger.new(log)
+ ActiveRecord::Base.logger = ActiveSupport::Logger.new(log)
ActiveRecord::Base.benchmark("Logging", :level => :debug, :silence => false) { ActiveRecord::Base.logger.debug "Quiet" }
assert_match(/Quiet/, log.string)
ensure

0 comments on commit 635080f

Please sign in to comment.
Something went wrong with that request. Please try again.