test/appenders/test_io.rb in logging-0.5.3 vs test/appenders/test_io.rb in logging-0.6.0
- old
+ new
@@ -1,6 +1,6 @@
-# $Id: test_io.rb 53 2007-11-28 00:21:33Z tim_pease $
+# $Id: test_io.rb 67 2007-12-26 16:27:06Z tim_pease $
require 'test/setup.rb'
require 'stringio'
module TestLogging
@@ -39,11 +39,12 @@
def test_append_error
@sio.close
event = ::Logging::LogEvent.new('TestLogger', @levels['warn'],
[1, 2, 3, 4], false)
assert_raise(IOError) {@appender.append event}
- assert_equal true, @appender.closed?
+ assert_equal false, @appender.closed?
+ assert_equal 5, @appender.level
end
def test_close
assert_equal false, @sio.closed?
assert_equal false, @appender.closed?
@@ -76,10 +77,11 @@
end
def test_concat_error
@sio.close
assert_raise(IOError) {@appender << 'oopsy'}
- assert_equal true, @appender.closed?
+ assert_equal false, @appender.closed?
+ assert_equal 5, @appender.level
end
def test_flush
ary = []
@sio.instance_variable_set :@ary, ary