require 'test_helper' class PublicSuffixService::RuleListTest < Test::Unit::TestCase def setup @list = PublicSuffixService::RuleList.new end def teardown PublicSuffixService::RuleList.clear end def test_initialize assert_instance_of PublicSuffixService::RuleList, @list assert_equal 0, @list.length end def test_initialize_create_index_when_empty assert_equal({}, @list.indexes) end def test_indexes @list = PublicSuffixService::RuleList.parse(<