test/unit/rule_test.rb in public_suffix-4.0.7 vs test/unit/rule_test.rb in public_suffix-5.0.0

- old
+ new

@@ -27,12 +27,12 @@ def test_default_returns_default_wildcard default = PublicSuffix::Rule.default assert_equal PublicSuffix::Rule::Wildcard.build("*"), default - assert_equal %w( example tldnotlisted ), default.decompose("example.tldnotlisted") - assert_equal %w( www.example tldnotlisted ), default.decompose("www.example.tldnotlisted") + assert_equal %w[example tldnotlisted], default.decompose("example.tldnotlisted") + assert_equal %w[www.example tldnotlisted], default.decompose("www.example.tldnotlisted") end end @@ -138,19 +138,19 @@ assert_equal 2, @klass.build("co.com").length assert_equal 3, @klass.build("mx.co.com").length end def test_parts - assert_equal %w(com), @klass.build("com").parts - assert_equal %w(co com), @klass.build("co.com").parts - assert_equal %w(mx co com), @klass.build("mx.co.com").parts + assert_equal %w[com], @klass.build("com").parts + assert_equal %w[co com], @klass.build("co.com").parts + assert_equal %w[mx co com], @klass.build("mx.co.com").parts end def test_decompose assert_equal [nil, nil], @klass.build("com").decompose("com") - assert_equal %w( example com ), @klass.build("com").decompose("example.com") - assert_equal %w( foo.example com ), @klass.build("com").decompose("foo.example.com") + assert_equal %w[example com], @klass.build("com").decompose("example.com") + assert_equal %w[foo.example com], @klass.build("com").decompose("foo.example.com") end end @@ -173,18 +173,18 @@ assert_equal 2, @klass.build("!british-library.uk").length assert_equal 3, @klass.build("!foo.british-library.uk").length end def test_parts - assert_equal %w( uk ), @klass.build("!british-library.uk").parts - assert_equal %w( tokyo jp ), @klass.build("!metro.tokyo.jp").parts + assert_equal %w[uk], @klass.build("!british-library.uk").parts + assert_equal %w[tokyo jp], @klass.build("!metro.tokyo.jp").parts end def test_decompose assert_equal [nil, nil], @klass.build("!british-library.uk").decompose("uk") - assert_equal %w( british-library uk ), @klass.build("!british-library.uk").decompose("british-library.uk") - assert_equal %w( foo.british-library uk ), @klass.build("!british-library.uk").decompose("foo.british-library.uk") + assert_equal %w[british-library uk], @klass.build("!british-library.uk").decompose("british-library.uk") + assert_equal %w[foo.british-library uk], @klass.build("!british-library.uk").decompose("foo.british-library.uk") end end @@ -207,16 +207,16 @@ assert_equal 2, @klass.build("*.uk").length assert_equal 3, @klass.build("*.co.uk").length end def test_parts - assert_equal %w( uk ), @klass.build("*.uk").parts - assert_equal %w( co uk ), @klass.build("*.co.uk").parts + assert_equal %w[uk], @klass.build("*.uk").parts + assert_equal %w[co uk], @klass.build("*.co.uk").parts end def test_decompose assert_equal [nil, nil], @klass.build("*.do").decompose("nic.do") - assert_equal %w( google co.uk ), @klass.build("*.uk").decompose("google.co.uk") - assert_equal %w( foo.google co.uk ), @klass.build("*.uk").decompose("foo.google.co.uk") + assert_equal %w[google co.uk], @klass.build("*.uk").decompose("google.co.uk") + assert_equal %w[foo.google co.uk], @klass.build("*.uk").decompose("foo.google.co.uk") end end