diff --git a/core/file/dirname_spec.rb b/core/file/dirname_spec.rb index 8e6016ce6..63436e19c 100644 --- a/core/file/dirname_spec.rb +++ b/core/file/dirname_spec.rb @@ -79,6 +79,10 @@ def object.to_int; 2; end end platform_is_not :windows do + it "ignores repeated leading / (edge cases on non-windows)" do + File.dirname("/////foo/bar/").should == "/foo" + end + it "returns all the components of filename except the last one (edge cases on non-windows)" do File.dirname('/////').should == '/' File.dirname("//foo//").should == "/"