summaryrefslogtreecommitdiff
path: root/spec/ruby/library/tempfile/delete_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/tempfile/delete_spec.rb')
-rw-r--r--spec/ruby/library/tempfile/delete_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/ruby/library/tempfile/delete_spec.rb b/spec/ruby/library/tempfile/delete_spec.rb
new file mode 100644
index 0000000000..b126ceae6a
--- /dev/null
+++ b/spec/ruby/library/tempfile/delete_spec.rb
@@ -0,0 +1,15 @@
+require_relative '../../spec_helper'
+require 'tempfile'
+
+describe "Tempfile#delete" do
+ before :each do
+ @tempfile = Tempfile.new("specs")
+ end
+
+ it "unlinks self" do
+ @tempfile.close
+ path = @tempfile.path
+ @tempfile.delete
+ File.should_not.exist?(path)
+ end
+end