about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-02-06 14:52:10 -0800
committerEric Wong <normalperson@yhbt.net>2009-02-09 19:50:54 -0800
commit25bbb88bcc16c1c0a10efc99472b05e9f6b45861 (patch)
tree4921a360284b9ccdda99fd9e0593160b0432649b /test
parent33cf16e950d32db97ef03fa304eb2b73e9b3cc87 (diff)
downloadunicorn-25bbb88bcc16c1c0a10efc99472b05e9f6b45861.tar.gz
Just stuff what little logic we had for it into HttpResponse
since Rack takes care of the rest for us.

Put the HTTP_STATUS_HEADERS hash in HttpResponse since we're the
only user of it.   Also, change HttpResponse.send to
HttpResponse.write to avoid overriding the default method.
Diffstat (limited to 'test')
-rw-r--r--test/unit/test_response.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/unit/test_response.rb b/test/unit/test_response.rb
index b142c07..5d60594 100644
--- a/test/unit/test_response.rb
+++ b/test/unit/test_response.rb
@@ -12,21 +12,21 @@ class ResponseTest < Test::Unit::TestCase
   
   def test_response_headers
     out = StringIO.new
-    HttpResponse.send(out,[200, {"X-Whatever" => "stuff"}, ["cool"]])
+    HttpResponse.write(out,[200, {"X-Whatever" => "stuff"}, ["cool"]])
 
     assert out.length > 0, "output didn't have data"
   end
 
   def test_response_200
     io = StringIO.new
-    HttpResponse.send(io, [200, {}, []])
+    HttpResponse.write(io, [200, {}, []])
     assert io.length > 0, "output didn't have data"
   end
 
   def test_response_with_default_reason
     code = 400
     io = StringIO.new
-    HttpResponse.send(io, [code, {}, []])
+    HttpResponse.write(io, [code, {}, []])
     io.rewind
     assert_match(/.* #{HTTP_STATUS_CODES[code]}$/, io.readline.chomp, "wrong default reason phrase")
   end