aboutsummaryrefslogtreecommitdiffstats
path: root/spec/rubyspec/core/file/realdirpath_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rubyspec/core/file/realdirpath_spec.rb')
-rw-r--r--spec/rubyspec/core/file/realdirpath_spec.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/rubyspec/core/file/realdirpath_spec.rb b/spec/rubyspec/core/file/realdirpath_spec.rb
index 3d50b8813c..06900ad461 100644
--- a/spec/rubyspec/core/file/realdirpath_spec.rb
+++ b/spec/rubyspec/core/file/realdirpath_spec.rb
@@ -88,9 +88,13 @@ platform_is :windows do
@file = tmp("realdirpath")
end
+ after :each do
+ rm_r @file
+ end
+
it "returns the same path" do
- file = __FILE__
- File.realdirpath(file).should == file
+ touch @file
+ File.realdirpath(@file).should == @file
end
it "returns the same path even if the last component does not exist" do