summaryrefslogtreecommitdiff
path: root/test/test_tempfile.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_tempfile.rb')
-rw-r--r--test/test_tempfile.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_tempfile.rb b/test/test_tempfile.rb
index 2fe62d37c5..6bba13473c 100644
--- a/test/test_tempfile.rb
+++ b/test/test_tempfile.rb
@@ -57,6 +57,11 @@ class TestTempfile < Test::Unit::TestCase
assert_match(/^foo/, File.basename(t.path))
end
+ def test_default_basename
+ t = tempfile
+ assert File.exist?(t.path)
+ end
+
def test_basename_with_suffix
t = tempfile(["foo", ".txt"])
assert_match(/^foo/, File.basename(t.path))