diff options
Diffstat (limited to 'test/unit/test_response.rb')
-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 |