diff options
author | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-05-16 04:51:00 +0000 |
---|---|---|
committer | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-05-16 04:51:00 +0000 |
commit | 4e7c657fc851e1a1acec3578731827f876dbeb07 (patch) | |
tree | e25b4fcb9a478e4a4b1e4dc7f5d93adc4fc9997b /test | |
parent | 7a8e36a8ca1febe6b798c78923ac632b543d086f (diff) | |
download | unicorn-4e7c657fc851e1a1acec3578731827f876dbeb07.tar.gz |
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@185 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'test')
-rw-r--r-- | test/test_response.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/test_response.rb b/test/test_response.rb index 8fb0832..99c0792 100644 --- a/test/test_response.rb +++ b/test/test_response.rb @@ -47,7 +47,7 @@ class ResponseTest < Test::Unit::TestCase def test_response_file contents = "PLAIN TEXT\r\nCONTENTS\r\n" require 'tempfile' - tmpf = Tempfile.new("test_response_file") + tmpf = open("test_response_file", "wb") tmpf.write(contents) tmpf.rewind @@ -60,7 +60,9 @@ class ResponseTest < Test::Unit::TestCase end io.rewind tmpf.close - + + File.unlink("test_response_file") + assert io.length > 0, "output didn't have data" assert io.read[-contents.length..-1] == contents, "output doesn't end with file payload" end |