diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-02-05 15:16:18 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-02-09 19:50:44 -0800 |
commit | a1c7992d47ac820c64604b8aeb8779a0bf741fcf (patch) | |
tree | b40dd375c1de2abbb38e17a1e3f6041915aa518f /test/unit | |
parent | 07846bcac6604babf0dd1f296d99c148b63340d6 (diff) | |
download | unicorn-a1c7992d47ac820c64604b8aeb8779a0bf741fcf.tar.gz |
The previous API was very flexible, but I don't think many people really cared for it... We now repeatedly use the same HeaderOut in each process since I completely don't care for multithreading.
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/test_response.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/test/unit/test_response.rb b/test/unit/test_response.rb index 1263a49..b142c07 100644 --- a/test/unit/test_response.rb +++ b/test/unit/test_response.rb @@ -12,25 +12,21 @@ class ResponseTest < Test::Unit::TestCase def test_response_headers out = StringIO.new - resp = HttpResponse.new(out,[200, {"X-Whatever" => "stuff"}, ["cool"]]) - resp.finished + HttpResponse.send(out,[200, {"X-Whatever" => "stuff"}, ["cool"]]) assert out.length > 0, "output didn't have data" end def test_response_200 io = StringIO.new - resp = HttpResponse.new(io, [200, {}, []]) - - resp.finished + HttpResponse.send(io, [200, {}, []]) assert io.length > 0, "output didn't have data" end def test_response_with_default_reason code = 400 io = StringIO.new - resp = HttpResponse.new(io, [code, {}, []]) - resp.start + HttpResponse.send(io, [code, {}, []]) io.rewind assert_match(/.* #{HTTP_STATUS_CODES[code]}$/, io.readline.chomp, "wrong default reason phrase") end |