aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_tempfile.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-08 08:24:01 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-08 08:24:01 +0000
commit4ebaed6bee490ecb0c333592fb0eb9949b9dd4db (patch)
tree080d96d56c291c5dbb91df512a663a3ba9c712f0 /test/test_tempfile.rb
parent98311146cc7fe189d84d7f2af08cd4e142f03704 (diff)
downloadruby-4ebaed6bee490ecb0c333592fb0eb9949b9dd4db.tar.gz
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
Diffstat (limited to 'test/test_tempfile.rb')
-rw-r--r--test/test_tempfile.rb8
1 files 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