about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-10-07 06:55:22 +0000
committerEric Wong <normalperson@yhbt.net>2010-10-07 06:55:22 +0000
commit8daf254356241c135ad2c843de567910528a10a7 (patch)
tree4202db8e7c4c53204f3a0b96d4edf37625e7ea5e /test
parent090f56bb79a8ec734719d9be90daa3cd01d29871 (diff)
downloadunicorn-8daf254356241c135ad2c843de567910528a10a7.tar.gz
This should be easier for Rainbows! to use
Diffstat (limited to 'test')
-rw-r--r--test/unit/test_tee_input.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/unit/test_tee_input.rb b/test/unit/test_tee_input.rb
index 263aa8a..a10ca34 100644
--- a/test/unit/test_tee_input.rb
+++ b/test/unit/test_tee_input.rb
@@ -5,7 +5,6 @@ require 'digest/sha1'
 require 'unicorn'
 
 class TestTeeInput < Test::Unit::TestCase
-  MockRequest = Struct.new(:env, :parser, :buf)
 
   def setup
     @rs = $/
@@ -164,7 +163,7 @@ class TestTeeInput < Test::Unit::TestCase
       @wr.write("0\r\n\r\n")
     }
     @wr.close
-    ti = Unicorn::TeeInput.new(@rd, MockRequest.new(@env, @parser, @buf))
+    ti = Unicorn::TeeInput.new(@rd, @parser)
     assert_nil @parser.content_length
     assert_nil ti.len
     assert ! @parser.body_eof?
@@ -202,7 +201,7 @@ class TestTeeInput < Test::Unit::TestCase
       end
       @wr.write("0\r\n\r\n")
     }
-    ti = Unicorn::TeeInput.new(@rd, MockRequest.new(@env, @parser, @buf))
+    ti = Unicorn::TeeInput.new(@rd, @parser)
     assert_nil @parser.content_length
     assert_nil ti.len
     assert ! @parser.body_eof?
@@ -231,7 +230,7 @@ class TestTeeInput < Test::Unit::TestCase
       @wr.write("Hello: World\r\n\r\n")
     }
     @wr.close
-    ti = Unicorn::TeeInput.new(@rd, MockRequest.new(@env, @parser, @buf))
+    ti = Unicorn::TeeInput.new(@rd, @parser)
     assert_nil @parser.content_length
     assert_nil ti.len
     assert ! @parser.body_eof?
@@ -253,7 +252,7 @@ private
            "\r\n#{body}"
     assert_equal @env, @parser.headers(@env, @buf)
     assert_equal body, @buf
-    MockRequest.new(@env, @parser, @buf)
+    @parser
   end
 
 end