aboutsummaryrefslogblamecommitdiffstats
path: root/activesupport/test/deprecation/buffered_logger_test.rb
blob: bf11a4732cf4a85fdf5d64d98ed0dc99ed9bbfb1 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                                                                            







                                                                                            
   
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