summaryrefslogtreecommitdiff
path: root/spec/ruby/library/tempfile/close_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/tempfile/close_spec.rb')
-rw-r--r--spec/ruby/library/tempfile/close_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/library/tempfile/close_spec.rb b/spec/ruby/library/tempfile/close_spec.rb
index aa776b840c..7e95ae1d7e 100644
--- a/spec/ruby/library/tempfile/close_spec.rb
+++ b/spec/ruby/library/tempfile/close_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
require 'tempfile'
describe "Tempfile#close when passed no argument or [false]" do
@@ -12,13 +12,13 @@ describe "Tempfile#close when passed no argument or [false]" do
it "closes self" do
@tempfile.close
- @tempfile.closed?.should be_true
+ @tempfile.closed?.should == true
end
it "does not unlink self" do
path = @tempfile.path
@tempfile.close
- File.exist?(path).should be_true
+ File.should.exist?(path)
end
end
@@ -29,13 +29,13 @@ describe "Tempfile#close when passed [true]" do
it "closes self" do
@tempfile.close(true)
- @tempfile.closed?.should be_true
+ @tempfile.closed?.should == true
end
it "unlinks self" do
path = @tempfile.path
@tempfile.close(true)
- File.exist?(path).should be_false
+ File.should_not.exist?(path)
end
end
@@ -46,12 +46,12 @@ describe "Tempfile#close!" do
it "closes self" do
@tempfile.close!
- @tempfile.closed?.should be_true
+ @tempfile.closed?.should == true
end
it "unlinks self" do
path = @tempfile.path
@tempfile.close!
- File.exist?(path).should be_false
+ File.should_not.exist?(path)
end
end