Sha256: 43f2c2c5535870e1d5c7ede8f88b9e8aed38ad1085d9b1bc59e35f88d2433447
Contents?: true
Size: 746 Bytes
Versions: 7
Compression:
Stored size: 746 Bytes
Contents
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
7 entries across 7 versions & 1 rubygems