summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_tempfile.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/test_tempfile.rb b/test/test_tempfile.rb
index ef035e358b..6a8933c392 100644
--- a/test/test_tempfile.rb
+++ b/test/test_tempfile.rb
@@ -396,8 +396,10 @@ puts Tempfile.new('foo').path
def test_create_traversal_dir
expect = Dir.glob(TRAVERSAL_PATH + '*').count
- Tempfile.create(TRAVERSAL_PATH + 'foo')
+ t = Tempfile.create(TRAVERSAL_PATH + 'foo')
actual = Dir.glob(TRAVERSAL_PATH + '*').count
assert_equal expect, actual
+ ensure
+ t.close
end
end