From a8154a181b9b12db019704e3473b9843b87d1b08 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 13 Feb 2009 13:32:35 -0800 Subject: test_upload: fix rename under 1.8 Ruby 1.9 Tempfile objects can be passed directly to File.rename (instead of the pathname). This doesn't work in 1.8, so always just pass the pathname to File.rename. --- test/unit/test_upload.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/unit/test_upload.rb b/test/unit/test_upload.rb index a2ccc54..3e9a115 100644 --- a/test/unit/test_upload.rb +++ b/test/unit/test_upload.rb @@ -111,7 +111,7 @@ class UploadTest < Test::Unit::TestCase start_server(lambda { |env| new_tmp = Tempfile.new('unicorn_test') input = env['rack.input'] - File.rename(input.path, new_tmp) + File.rename(input.path, new_tmp.path) resp = { :inode => input.stat.ino, :size => input.stat.size, -- cgit v1.2.3-24-ge0c7