diff options
author | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-05-16 05:06:22 +0000 |
---|---|---|
committer | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-05-16 05:06:22 +0000 |
commit | 3f3dab42dfc8eb129cb6652e3a580490eeeef7eb (patch) | |
tree | c56096f4f4e0c989385da861b4924acfcfe383d0 /test | |
parent | 4e7c657fc851e1a1acec3578731827f876dbeb07 (diff) | |
download | unicorn-3f3dab42dfc8eb129cb6652e3a580490eeeef7eb.tar.gz |
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@186 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'test')
-rw-r--r-- | test/test_response.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/test_response.rb b/test/test_response.rb index 99c0792..2ebcdb0 100644 --- a/test/test_response.rb +++ b/test/test_response.rb @@ -47,7 +47,8 @@ class ResponseTest < Test::Unit::TestCase def test_response_file contents = "PLAIN TEXT\r\nCONTENTS\r\n" require 'tempfile' - tmpf = open("test_response_file", "wb") + tmpf = Tempfile.new("test_response_file") + tmpf.binmode tmpf.write(contents) tmpf.rewind @@ -61,8 +62,6 @@ class ResponseTest < Test::Unit::TestCase 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 |