about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--test/test_response.rb6
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