summaryrefslogtreecommitdiff
path: root/test/test_tmpdir.rb
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-11 08:33:37 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-11 08:33:37 +0000
commite22f3bf91f455165f0649ee14cacbfd4347e530f (patch)
tree633e4614586d7bec374934181da7c4e702f3a58a /test/test_tmpdir.rb
parent9366d7092f824aeae555f80c9afa645e59822b54 (diff)
test/test_{tempfile,tmpdir}: get rid of leftover files
I ran out of inodes in $TMPDIR git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_tmpdir.rb')
-rw-r--r--test/test_tmpdir.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/test_tmpdir.rb b/test/test_tmpdir.rb
index 202098c..eba9405 100644
--- a/test/test_tmpdir.rb
+++ b/test/test_tmpdir.rb
@@ -64,15 +64,17 @@ class TestTmpdir < Test::Unit::TestCase
def test_mktmpdir_traversal
expect = Dir.glob(TRAVERSAL_PATH + '*').count
- Dir.mktmpdir(TRAVERSAL_PATH + 'foo')
- actual = Dir.glob(TRAVERSAL_PATH + '*').count
- assert_equal expect, actual
+ Dir.mktmpdir(TRAVERSAL_PATH + 'foo') do
+ actual = Dir.glob(TRAVERSAL_PATH + '*').count
+ assert_equal expect, actual
+ end
end
def test_mktmpdir_traversal_array
expect = Dir.glob(TRAVERSAL_PATH + '*').count
- Dir.mktmpdir([TRAVERSAL_PATH, 'foo'])
- actual = Dir.glob(TRAVERSAL_PATH + '*').count
- assert_equal expect, actual
+ Dir.mktmpdir([TRAVERSAL_PATH, 'foo']) do
+ actual = Dir.glob(TRAVERSAL_PATH + '*').count
+ assert_equal expect, actual
+ end
end
end