Sha256: 198058ea8b46f0c3c53aa8e936715b2014a7bda6b40dad9db47696cdabf6865f

Contents?: true

Size: 923 Bytes

Versions: 2

Compression:

Stored size: 923 Bytes

Contents

# $Id$

require File.join(File.dirname(__FILE__), %w[.. setup])

module TestLogging
module TestAppenders

  class TestStdout < Test::Unit::TestCase
    include LoggingTestCase

    def test_initialize
      appender = ::Logging::Appenders::Stdout.new
      assert_equal 'stdout', appender.name
      assert_same STDOUT, appender.instance_variable_get(:@io)

      appender.close
      assert_equal true, appender.closed?
      assert_equal false, STDOUT.closed?
    end

  end  # class TestStdout

  class TestStderr < Test::Unit::TestCase

    def test_initialize
      appender = ::Logging::Appenders::Stderr.new
      assert_equal 'stderr', appender.name
      assert_same STDERR, appender.instance_variable_get(:@io)

      appender.close
      assert_equal true, appender.closed?
      assert_equal false, STDERR.closed?
    end

  end  # class TestStderr

end  # module TestAppenders
end  # module TestLogging

# EOF

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
filterfish-logging-0.9.8 test/appenders/test_console.rb
logging-0.8.0 test/appenders/test_console.rb