summaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2009-04-20 23:37:13 +0000
committermurphy <murphy@rubychan.de>2009-04-20 23:37:13 +0000
commitd9e3116a9f3d6aa3da0acd8d540d113f2a51bea1 (patch)
treea1a63628b041584094b535422057ef05271987e1 /test/functional
parent32701fcf0c5f0e54d7172ceb86e44664aa4bae10 (diff)
downloadcoderay-d9e3116a9f3d6aa3da0acd8d540d113f2a51bea1.tar.gz
FIXED: CaseIgnoringWordList respects default value (closes #97).
* Test cases added.
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/word_list.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/word_list.rb b/test/functional/word_list.rb
index 0ef275a..4fa8dbb 100644
--- a/test/functional/word_list.rb
+++ b/test/functional/word_list.rb
@@ -45,20 +45,24 @@ class WordListTest < Test::Unit::TestCase
def test_case_ignoring_word_list
list = CaseIgnoringWordList.new(:ident).add(['foobar'], :reserved)
+ assert_equal :ident, list['foo']
assert_equal :reserved, list['foobar']
assert_equal :reserved, list['FooBar']
list = CaseIgnoringWordList.new(:ident).add(['FooBar'], :reserved)
+ assert_equal :ident, list['foo']
assert_equal :reserved, list['foobar']
assert_equal :reserved, list['FooBar']
end
def test_case_ignoring_word_list_cached
list = CaseIgnoringWordList.new(:ident, true).add(['foobar'], :reserved)
+ assert_equal :ident, list['foo']
assert_equal :reserved, list['foobar']
assert_equal :reserved, list['FooBar']
list = CaseIgnoringWordList.new(:ident, true).add(['FooBar'], :reserved)
+ assert_equal :ident, list['foo']
assert_equal :reserved, list['foobar']
assert_equal :reserved, list['FooBar']
end