Move logic to reject slugs that are just numbers into the slug module

This commit is contained in:
Neil Lalonde
2013-05-30 11:54:02 -04:00
parent 7d5c313456
commit b82a5dfd56
3 changed files with 10 additions and 4 deletions

View File

@ -43,5 +43,13 @@ describe Slug do
Slug.for("o_o_o").should == "o-o-o"
end
it "doesn't generate slugs that are just numbers" do
Slug.for('123').should be_blank
end
it "doesn't generate slugs that are just numbers" do
Slug.for('電車男 2').should be_blank
end
end