Sha256: 4c26ed4f5c762949d6f8b40837bdd14ea179212c11d008d2f83c7d517a7b58cf
Contents?: true
Size: 454 Bytes
Versions: 1
Compression:
Stored size: 454 Bytes
Contents
describe File do it "remove bad characters" do expect(safe("john*test.jpg")).to eq "john-test.jpg" expect(safe(" Betty Boop-*StarHyphen")).to eq "-Betty-Boop-StarHyphen" expect(safe("What The Hotel?")).to eq "What-The-Hotel-" end it "should prittify & to and" do expect(safe("Guns & Roses")).to eq "Guns-and-Roses" expect(safe("& They Lived")).to eq "and-They-Lived" end def safe(from) File.safe_name(from) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruby_core_extensions-0.0.1 | spec/filename_spec.rb |