提交 cfa35c55 编写于 作者: Y Yves Senn

remove deprecated `BufferedLogger`.

上级 cd74f029
* Remove deprecated `BufferedLogger`.
*Yves Senn*
* Remove deprecated `assert_present` and `assert_blank` methods.
*Yves Senn*
......
require 'active_support/deprecation'
require 'active_support/logger'
module ActiveSupport
class BufferedLogger < Logger
def initialize(*args)
self.class._deprecation_warning
super
end
def self.inherited(*)
_deprecation_warning
super
end
def self._deprecation_warning
::ActiveSupport::Deprecation.warn 'ActiveSupport::BufferedLogger is deprecated! Use ActiveSupport::Logger instead.'
end
end
end
require 'active_support/log_subscriber'
require 'active_support/buffered_logger'
require 'active_support/notifications'
module ActiveSupport
......
require 'abstract_unit'
require 'active_support/buffered_logger'
class BufferedLoggerTest < ActiveSupport::TestCase
def test_can_be_subclassed
warn = 'ActiveSupport::BufferedLogger is deprecated! Use ActiveSupport::Logger instead.'
ActiveSupport::Deprecation.expects(:warn).with(warn).once
Class.new(ActiveSupport::BufferedLogger)
end
def test_issues_deprecation_when_instantiated
warn = 'ActiveSupport::BufferedLogger is deprecated! Use ActiveSupport::Logger instead.'
ActiveSupport::Deprecation.expects(:warn).with(warn).once
ActiveSupport::BufferedLogger.new(STDOUT)
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册