about summary refs log tree commit homepage
path: root/test/test_clogger.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2014-05-12 06:39:04 +0000
committerEric Wong <normalperson@yhbt.net>2014-05-12 06:39:04 +0000
commit1f5f9b0d64af4f0fc741a7ce095bf33745c54abe (patch)
tree4bf38b5b08584cfe4d3323f8376ff2405c89b70d /test/test_clogger.rb
parent58f027b6c7bf6bb319e5601594219887770edcc7 (diff)
downloadclogger-1f5f9b0d64af4f0fc741a7ce095bf33745c54abe.tar.gz
StringIO isn't a very realistic use case, and our changing
the length of a shared string causes errors on 32-bit.
Diffstat (limited to 'test/test_clogger.rb')
-rw-r--r--test/test_clogger.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/test_clogger.rb b/test/test_clogger.rb
index b47c112..953152e 100644
--- a/test/test_clogger.rb
+++ b/test/test_clogger.rb
@@ -222,12 +222,11 @@ class TestClogger < Test::Unit::TestCase
     req = @req.merge("HTTP_X_FORWARDED_FOR" => '192.168.1.1')
     status, headers, body = cl.call(req)
     assert_equal "192.168.1.1\n", str.string
-    str.rewind
-    str.truncate(0)
+
+    str = StringIO.new
+    cl = Clogger.new(app, :logger => str, :format => "$ip")
     status, headers, body = cl.call(@req)
     assert_equal "home\n", str.string
-    str.rewind
-    str.truncate(0)
   end
 
   def test_rack_1_0