require "test_helper" class PublicSuffix::ListTest < Minitest::Test def setup @list = PublicSuffix::List.new end def teardown PublicSuffix::List.default = nil end def test_initialize assert_instance_of PublicSuffix::List, @list assert_equal 0, @list.size end def test_equality_with_self list = PublicSuffix::List.new assert_equal list, list end def test_equality_with_internals rule = PublicSuffix::Rule.factory("com") assert_equal PublicSuffix::List.new.add(rule), PublicSuffix::List.new.add(rule) end def test_each_without_block list = PublicSuffix::List.parse(<