Sha256: 1e6ed7daf4113ec267d5c5ef56058b1d4630cadc3b73663a2e70e501a1e30d48
Contents?: true
Size: 850 Bytes
Versions: 3
Compression:
Stored size: 850 Bytes
Contents
# -*- encoding: utf-8 -*- require "spec_helper" describe "String#to_permalink" do SAMPLES = { 'This IS a Tripped out title!!.!1 (well/ not really)' => 'this-is-a-tripped-out-title-1-well-not-really', '////// meph1sto r0x ! \\\\\\' => 'meph1sto-r0x', 'āčēģīķļņū' => 'acegiklnu', '中文測試 chinese text' => 'chinese-text', 'some-)()()-ExtRa!/// .data==?> to \/\/test' => 'some-extra-data-to-test', 'http://simplesideias.com.br/tags/' => 'http-simplesideias-com-br-tags', "Don't Repeat Yourself (DRY)" => 'dont-repeat-yourself-dry', "Text\nwith\nline\n\n\tbreaks" => 'text-with-line-breaks', "can't do it" => "cant-do-it", "i'm a dog" => "im-a-dog" } it "should create permalink using to_permalink" do SAMPLES.each do |from, to| from.to_permalink.should == to end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
permalink-1.2.1 | spec/permalink/string_spec.rb |
permalink-1.2.0 | spec/permalink/string_spec.rb |
permalink-1.1.2 | spec/permalink/string_spec.rb |