Class TestRegexList
In: lib/regex_list.rb
Parent: ::Test::Unit::TestCase

Methods

Included Modules

RegexList::Assertions

Public Instance methods

[Source]

# File lib/regex_list.rb, line 136
    def setup
      assert_nothing_raised do
        @regex_list = RegexList.new %w[ a/abc b/foo fg kb c/a a/bar f ]
      end
    end

[Source]

# File lib/regex_list.rb, line 142
    def teardown
    end

[Source]

# File lib/regex_list.rb, line 145
    def test_0_initialize
    end

[Source]

# File lib/regex_list.rb, line 148
    def test_score_without_cache
      assert_regex_list_score 'a', 0
      assert_regex_list_score 'a/abc', 64
      assert_regex_list_score 'kb', 8
      assert_regex_list_score 'f', 1
      assert_regex_list_score 'a/abc/fg', 81
      assert_regex_list_score 'kb/foo', 41
      assert_regex_list_score 'a/abc b/foo fg kb c/a a/bar f', 127
      assert_regex_list_score 'a/abca/abca/abca/abc', 64
    end

[Validate]