diff options
author | Michael Koziarski <michael@koziarski.com> | 2007-09-06 03:26:14 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2007-09-06 03:26:14 +0000 |
commit | 8a9f43ecbb99f470cc8720c09a1c9480abdc845e (patch) | |
tree | 9463866a088cc3ad76005e719f51b41e475c12c8 | |
parent | a75d273ececd36221c58540c2872601d8ce17eab (diff) | |
download | rails-8a9f43ecbb99f470cc8720c09a1c9480abdc845e.tar.gz rails-8a9f43ecbb99f470cc8720c09a1c9480abdc845e.tar.bz2 rails-8a9f43ecbb99f470cc8720c09a1c9480abdc845e.zip |
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
-rw-r--r-- | activesupport/test/core_ext/file_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 |