Sha256: 590f66a6e5bbbdce6850f68a65f80018055b593fd74bcf7dd29dc1be33beb59f
Contents?: true
Size: 785 Bytes
Versions: 2
Compression:
Stored size: 785 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)" => 'don-t-repeat-yourself-dry', "Text\nwith\nline\n\n\tbreaks" => 'text-with-line-breaks' } it "should create permalink using to_permalink" do SAMPLES.each do |from, to| from.to_permalink.should == to end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
permalink-1.1.1 | spec/permalink/string_spec.rb |
permalink-1.1.0 | spec/permalink/string_spec.rb |