Skip to content

Instantly share code, notes, and snippets.

@kronos
Created March 22, 2010 18:10
Show Gist options
  • Save kronos/340343 to your computer and use it in GitHub Desktop.
Save kronos/340343 to your computer and use it in GitHub Desktop.
it "ignores a trailing directory seperator" do
File.basename("foo.rb/", '.rb').should == "foo"
File.basename("bar.rb///", '.*').should == "bar"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment