Sha256: 35062d5d0a820950241675ac11d46cc0a3c11ab81eaaada08cd36213662d6861
Contents?: true
Size: 762 Bytes
Versions: 3
Compression:
Stored size: 762 Bytes
Contents
# typed: strict require 'tmpdir' require 'public_suffix_list' describe PublicSuffixList do it "should handle the cases in the rdoc synopsis" do PublicSuffixList.new.tld("foobar.com").should == "com" PublicSuffixList.new.cdn("foobar.com").should == "foobar.com" PublicSuffixList.new(:cache_dir => "/tmp").split("abc.xyz.co.uk").should == ["abc", "xyz", "co.uk"] PublicSuffixList.new(:cache_dir => "/tmp", :cache_expiry_period => 100).split("test.parliament.uk").should == ["test", "parliament", "uk"] p = PublicSuffixList.new p.split("fee.fi.fo.com").should == ["fee.fi", "fo", "com"] p.cdn("fee.fi.fo.com").should == "fo.com" p.tld("fee.fi.fo.com").should == "com" PublicSuffixList.new(:url => "spec/test.dat") end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
public-suffix-list-0.2.4 | spec/rdoc_synopsis_spec.rb |
public-suffix-list-0.2.3 | spec/rdoc_synopsis_spec.rb |
public-suffix-list-0.2.2 | spec/rdoc_synopsis_spec.rb |