summaryrefslogtreecommitdiff
path: root/spec/ruby/core/file/realpath_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/file/realpath_spec.rb')
-rw-r--r--spec/ruby/core/file/realpath_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/ruby/core/file/realpath_spec.rb b/spec/ruby/core/file/realpath_spec.rb
index bd27e09da6..bd25bfdecf 100644
--- a/spec/ruby/core/file/realpath_spec.rb
+++ b/spec/ruby/core/file/realpath_spec.rb
@@ -54,6 +54,10 @@ platform_is_not :windows do
File.realpath(@relative_symlink).should == @file
end
+ it "removes the file element when going one level up" do
+ File.realpath('../', @file).should == @real_dir
+ end
+
it "raises an Errno::ELOOP if the symlink points to itself" do
File.unlink @link
File.symlink(@link, @link)