1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activesupport/test/deprecation/buffered_logger_test.rb

22 lines
618 B
Ruby

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