about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorIan Ownbey <imownbey@ian-ownbeys-macbook.local>2008-12-01 03:45:43 -0500
committerIan Ownbey <imownbey@ian-ownbeys-macbook.local>2008-12-01 03:45:43 -0500
commit384e40051b90087323ad764712e94a3bb86bc49b (patch)
tree0d8194ffd2c401479dc4ec86f0190654a1ca650e
parentd2dcbb98ae7c3963c0c658c196644095ccaec1ca (diff)
downloadunicorn-384e40051b90087323ad764712e94a3bb86bc49b.tar.gz
-rw-r--r--test/unit/test_response.rb23
1 files changed, 0 insertions, 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