summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-31 04:45:02 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-31 04:45:02 +0000
commit56ef54338b7ad3df962190d5a6aaab7f100d2ea6 (patch)
treece8293787b2dd5e3e52d0737f1d7cf62ac836f1b
parent9794af357e7b9dab52b62a62a2031d7e7903c5c2 (diff)
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
-rw-r--r--test/test_tempfile.rb10
1 files 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