From 4ebaed6bee490ecb0c333592fb0eb9949b9dd4db Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 8 Jan 2016 08:24:01 +0000 Subject: test_tempfile.rb: use assert_file * test/test_tempfile.rb (test_create_with{,out}_block): use assert_file for descriptive failure messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/test_tempfile.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test_tempfile.rb b/test/test_tempfile.rb index c8af2f5b4d..815c243753 100644 --- a/test/test_tempfile.rb +++ b/test/test_tempfile.rb @@ -329,18 +329,18 @@ puts Tempfile.new('foo').path path = nil Tempfile.create("tempfile-create") {|f| path = f.path - assert(File.exist?(path)) + assert_file.exist?(path) } - assert(!File.exist?(path)) + assert_file.not_exist?(path) end def test_create_without_block path = nil f = Tempfile.create("tempfile-create") path = f.path - assert(File.exist?(path)) + assert_file.exist?(path) f.close - assert(File.exist?(path)) + assert_file.exist?(path) ensure f.close if f && !f.closed? File.unlink path if path -- cgit v1.2.3