From 56ef54338b7ad3df962190d5a6aaab7f100d2ea6 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 31 May 2015 04:45:02 +0000 Subject: [PATCH] test_tempfile.rb: use assert_file * test/test_tempfile.rb: use assert_file for better failure messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/test_tempfile.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/test_tempfile.rb b/test/test_tempfile.rb index e9ce45da94..1b609f4440 100644 --- a/test/test_tempfile.rb +++ b/test/test_tempfile.rb @@ -76,7 +76,7 @@ class TestTempfile < Test::Unit::TestCase assert_file.exist?(path) t.unlink - assert !File.exist?(path) + assert_file.not_exist?(path) assert_nil t.path end @@ -99,7 +99,7 @@ class TestTempfile < Test::Unit::TestCase begin path = tempfile.path tempfile.unlink - assert !File.exist?(path) + assert_file.not_exist?(path) tempfile.write("hello ") tempfile.write("world\n") tempfile.rewind @@ -123,7 +123,7 @@ class TestTempfile < Test::Unit::TestCase t.close(true) assert t.closed? assert_nil t.path - assert !File.exist?(path) + assert_file.not_exist?(path) end def test_close_with_unlink_now_true_does_not_unlink_if_already_unlinked @@ -145,7 +145,7 @@ class TestTempfile < Test::Unit::TestCase t.close! assert t.closed? assert_nil t.path - assert !File.exist?(path) + assert_file.not_exist?(path) end def test_close_bang_does_not_unlink_if_already_unlinked @@ -207,7 +207,7 @@ File.open(path, "w").close assert_in_out_err('-rtempfile', <<-'EOS') do |(filename), (error)| puts Tempfile.new('foo').path EOS - assert !File.exist?(filename), "tempfile must not be exist after GC." + assert_file.for("tempfile must not be exist after GC.").not_exist?(filename) assert_nil(error) end end