test/layouts/test_basic.rb in logging-0.5.1 vs test/layouts/test_basic.rb in logging-0.5.2
- old
+ new
@@ -1,6 +1,6 @@
-# $Id: test_basic.rb 25 2007-01-30 20:19:12Z tim_pease $
+# $Id: test_basic.rb 53 2007-11-28 00:21:33Z tim_pease $
require 'test/setup.rb'
module TestLogging
module TestLayouts
@@ -19,10 +19,11 @@
event = ::Logging::LogEvent.new( 'ArrayLogger', @levels['info'],
'log message', false)
assert_equal " INFO ArrayLogger : log message\n", @layout.format(event)
event.data = [1, 2, 3, 4]
- assert_equal " INFO ArrayLogger : <Array> 1234\n", @layout.format(event)
+ assert_equal(" INFO ArrayLogger : <Array> #{[1,2,3,4]}\n",
+ @layout.format(event))
event.level = @levels['debug']
event.data = 'and another message'
log = "DEBUG ArrayLogger : and another message\n"
assert_equal log, @layout.format(event)