Sha256: ca8e54824789efd9cb7d534247bf27c91cff8964fc13566d8c268990a2faaab5
Contents?: true
Size: 479 Bytes
Versions: 5
Compression:
Stored size: 479 Bytes
Contents
require File.join(File.dirname(__FILE__) + "/spec_helper") describe String, "to_url" do it "should remove non-valid characters" do "a!@£$".to_url.should == "a" end it "should convert spaces to hyphens" do "a string".to_url.should == "a-string" end it "should downcase entire string" do "THISISASTRING".to_url.should == "thisisastring" end it "should not touch [\\-0-9a-z]" do "post-number-12345".to_url.should == "post-number-12345" end end
Version data entries
5 entries across 5 versions & 1 rubygems