From 8a9f43ecbb99f470cc8720c09a1c9480abdc845e Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Thu, 6 Sep 2007 03:26:14 +0000 Subject: Fix activesupport atomic_write tests when Dir.tmpdir is on another partition. Closes #8573 [tpope] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7412 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/test/core_ext/file_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport/test/core_ext/file_test.rb') diff --git a/activesupport/test/core_ext/file_test.rb b/activesupport/test/core_ext/file_test.rb index a7a8324125..77930cd3e9 100644 --- a/activesupport/test/core_ext/file_test.rb +++ b/activesupport/test/core_ext/file_test.rb @@ -4,14 +4,14 @@ class AtomicWriteTest < Test::Unit::TestCase def test_atomic_write_without_errors contents = "Atomic Text" - File.atomic_write(file_name) do |file| + File.atomic_write(file_name, Dir.pwd) do |file| file.write(contents) assert !File.exists?(file_name) end assert File.exists?(file_name) assert_equal contents, File.read(file_name) ensure - File.unlink(file_name) + File.unlink(file_name) rescue nil end def test_atomic_write_doesnt_write_when_block_raises -- cgit v1.2.3