summaryrefslogtreecommitdiffstats
path: root/t/020-random-word.t
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2008-02-02 23:36:16 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2008-02-02 23:36:16 -0500
commit46a035455783962edcad336dc659465620908152 (patch)
tree5e69d4ef00e5540fb1086b09a8dfa4d7da99c43b /t/020-random-word.t
parentfb30d9468ff23430b7e282fae858752480fe61d2 (diff)
downloadgames-word-46a035455783962edcad336dc659465620908152.tar.gz
games-word-46a035455783962edcad336dc659465620908152.zip
fix up tests based on Devel::Cover reports
Diffstat (limited to 't/020-random-word.t')
-rw-r--r--t/020-random-word.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/020-random-word.t b/t/020-random-word.t
index ad2c830..71b1959 100644
--- a/t/020-random-word.t
+++ b/t/020-random-word.t
@@ -1,7 +1,7 @@
#!perl -T
use strict;
use warnings;
-use Test::More tests => 5;
+use Test::More tests => 6;
use Games::Word::Wordlist;
my $wl = Games::Word::Wordlist->new(['foo', 'bar', 'baz', 'quux']);
@@ -20,3 +20,7 @@ like($word, qr/^(foo|bar|baz)$/,
is($wl->random_word(5), undef,
"random_word returns undef if no words are found");
+
+my $wl2 = Games::Word::Wordlist->new([]);
+is($wl2->random_word, undef,
+ "random word returns undef with an empty word list");