# $Id: test_console.rb 17 2007-01-20 18:47:43Z tim_pease $ require 'test/setup.rb' 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