summaryrefslogtreecommitdiffstats
path: root/t/023-is-word-nocache.t
diff options
context:
space:
mode:
Diffstat (limited to 't/023-is-word-nocache.t')
-rw-r--r--t/023-is-word-nocache.t9
1 files changed, 3 insertions, 6 deletions
diff --git a/t/023-is-word-nocache.t b/t/023-is-word-nocache.t
index 8555fbd..3b51e15 100644
--- a/t/023-is-word-nocache.t
+++ b/t/023-is-word-nocache.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 21;
+use Test::More tests => 11;
use Test::Exception;
use Games::Word::Wordlist;
@@ -10,14 +10,11 @@ $word_file = '/usr/dict/words' if -r '/usr/dict/words';
$word_file = '/usr/share/dict/words' if -r '/usr/share/dict/words';
SKIP: {
- skip "Can't find a system word list", 21 if $word_file eq '';
+ skip "Can't find a system word list", 11 if $word_file eq '';
my $wl = Games::Word::Wordlist->new($word_file, cache => 0);
- my $result;
for (1..10) {
- lives_ok(sub { $result = $wl->is_word($wl->random_word) },
- "testing calling is_word");
- ok($result,
+ ok($wl->is_word($wl->random_word),
"checking to see if a random word from the word list is a word");
}
ok(!$wl->is_word("notaword"), "testing is_word with a non-word");