Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tag: v0.6.4
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (18 sloc) 0.464 kb
require File.dirname(__FILE__) + '/base'
describe String do
before do
@string = "abc"
end
it "heads from the front of the string" do
@string.head(1).should == 'a'
end
it "tails from the back of the string" do
@string.tail(1).should == 'c'
end
it "gives the whole string when head exceeds length" do
@string.head(999).should == @string
end
it "gives the whole string when tail exceeds length" do
@string.tail(999).should == @string
end
end
Jump to Line
Something went wrong with that request. Please try again.