Sha256: 52ac64054731f0092f0c394234c42c89f1ef31cca3ecb0e48a9a715a5750f125

Contents?: true

Size: 609 Bytes

Versions: 3

Compression:

Stored size: 609 Bytes

Contents

# typed: strict
require 'public_suffix_list'

describe PublicSuffixList do

  it "should be case insensitive" do
    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"
    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"
    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"
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
public-suffix-list-0.2.4 spec/upcase_downcase_spec.rb
public-suffix-list-0.2.3 spec/upcase_downcase_spec.rb
public-suffix-list-0.2.2 spec/upcase_downcase_spec.rb