From b6f6dd95ebd94391e8ca03ebd37f6863a6aecfb6 Mon Sep 17 00:00:00 2001 From: murphy Date: Sun, 18 Oct 2009 17:16:59 +0000 Subject: Testing whether #dup works for WordList as expected. --- test/functional/word_list.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') diff --git a/test/functional/word_list.rb b/test/functional/word_list.rb index 4399c6a..04f4a02 100644 --- a/test/functional/word_list.rb +++ b/test/functional/word_list.rb @@ -67,4 +67,13 @@ class WordListTest < Test::Unit::TestCase assert_equal :reserved, list['FooBar'] end + def test_dup + list = WordList.new(:ident).add(['foobar'], :reserved) + assert_equal :reserved, list['foobar'] + list2 = list.dup + list2.add(%w[foobar], :keyword) + assert_equal :keyword, list2['foobar'] + assert_equal :reserved, list['foobar'] + end + end \ No newline at end of file -- cgit v1.2.1