diff options
Diffstat (limited to 'activesupport')
-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 |