diff options
author | kennyj <kennyj@gmail.com> | 2013-06-01 13:08:45 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2013-06-01 21:23:19 +0900 |
commit | f8f30c88ad6190589e34f18813031f6c260e71dd (patch) | |
tree | 893b03c496f7e1abed72c660c2917c7895b91efc /activerecord/test | |
parent | 6f3e01e8b78eff1b1685a0b35d70819376bfd773 (diff) | |
download | rails-f8f30c88ad6190589e34f18813031f6c260e71dd.tar.gz rails-f8f30c88ad6190589e34f18813031f6c260e71dd.tar.bz2 rails-f8f30c88ad6190589e34f18813031f6c260e71dd.zip |
Remove ActiveSupport::Benchmarkable#silence was deprecated.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/base_test.rb | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index 56b417562b..7051822f73 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -1228,38 +1228,6 @@ class BasicsTest < ActiveRecord::TestCase assert_no_queries { assert true } end - def test_silence_sets_log_level_to_error_in_block - original_logger = ActiveRecord::Base.logger - - assert_deprecated do - log = StringIO.new - ActiveRecord::Base.logger = ActiveSupport::Logger.new(log) - ActiveRecord::Base.logger.level = Logger::DEBUG - ActiveRecord::Base.silence do - ActiveRecord::Base.logger.warn "warn" - ActiveRecord::Base.logger.error "error" - end - assert_equal "error\n", log.string - end - ensure - ActiveRecord::Base.logger = original_logger - end - - def test_silence_sets_log_level_back_to_level_before_yield - original_logger = ActiveRecord::Base.logger - - assert_deprecated do - log = StringIO.new - ActiveRecord::Base.logger = ActiveSupport::Logger.new(log) - ActiveRecord::Base.logger.level = Logger::WARN - ActiveRecord::Base.silence do - end - assert_equal Logger::WARN, ActiveRecord::Base.logger.level - end - ensure - ActiveRecord::Base.logger = original_logger - end - def test_benchmark_with_log_level original_logger = ActiveRecord::Base.logger log = StringIO.new |