Created
March 22, 2010 17:03
-
-
Save kronos/340271 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it "return the basename for edge cases" do | |
File.basename("").should == "" | |
File.basename(".").should == "." | |
File.basename("..").should == ".." | |
platform_is_not :windows do | |
File.basename("//foo/").should == "foo" | |
File.basename("//foo//").should == "foo" | |
end | |
File.basename("foo/").should == "foo" | |
File.basename("foo.rb/", '.rb').should == "foo" # new line | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment