Strip leading and trailing slug punctuation.

This commit is contained in:
Dan Neumann
2013-02-06 19:52:14 -06:00
parent 415f810089
commit ee8d68842e
2 changed files with 8 additions and 0 deletions

View File

@@ -27,6 +27,13 @@ describe Slug do
Slug.for("a....b.....c").should == "a-b-c"
end
it 'strips trailing punctuation' do
Slug.for("hello...").should == "hello"
end
it 'strips leading punctuation' do
Slug.for("...hello").should == "hello"
end
end