From 384e40051b90087323ad764712e94a3bb86bc49b Mon Sep 17 00:00:00 2001 From: Ian Ownbey Date: Mon, 1 Dec 2008 03:45:43 -0500 Subject: Got rid of send_file test, moved to rack --- test/unit/test_response.rb | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/test/unit/test_response.rb b/test/unit/test_response.rb index 769b0d6..f0efdb1 100644 --- a/test/unit/test_response.rb +++ b/test/unit/test_response.rb @@ -26,28 +26,6 @@ class ResponseTest < Test::Unit::TestCase assert io.length > 0, "output didn't have data" end - def test_response_file - contents = "PLAIN TEXT\r\nCONTENTS\r\n" - require 'tempfile' - tmpf = Tempfile.new("test_response_file") - tmpf.binmode - tmpf.write(contents) - tmpf.rewind - - io = StringIO.new - resp = HttpResponse.new(io) - resp.start(200) do |head,out| - head['Content-Type'] = 'text/plain' - resp.send_header - resp.send_file(tmpf.path) - end - io.rewind - tmpf.close - - assert io.length > 0, "output didn't have data" - assert io.read[-contents.length..-1] == contents, "output doesn't end with file payload" - end - def test_response_with_default_reason code = 400 io = StringIO.new @@ -56,6 +34,5 @@ class ResponseTest < Test::Unit::TestCase io.rewind assert_match(/.* #{HTTP_STATUS_CODES[code]}$/, io.readline.chomp, "wrong default reason phrase") end - end -- cgit v1.2.3-24-ge0c7