diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-01-08 08:24:01 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-01-08 08:24:01 +0000 |
commit | 92764b30fbfe97f31d70166abed64db77c7eff33 (patch) | |
tree | 080d96d56c291c5dbb91df512a663a3ba9c712f0 /test/test_tempfile.rb | |
parent | d6e38bd44894144e929bb3d45adfb29adad33fa9 (diff) | |
download | ruby-92764b30fbfe97f31d70166abed64db77c7eff33.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.rb | 8 |
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 |