summaryrefslogtreecommitdiffstats
path: root/t/013-random-string-from.t
diff options
context:
space:
mode:
Diffstat (limited to 't/013-random-string-from.t')
-rw-r--r--t/013-random-string-from.t6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/013-random-string-from.t b/t/013-random-string-from.t
index ef8bc61..78e907f 100644
--- a/t/013-random-string-from.t
+++ b/t/013-random-string-from.t
@@ -3,13 +3,13 @@ use strict;
use warnings;
use Test::More tests => 23;
use Test::Deep;
+use Test::Exception;
use Games::Word qw/random_string_from/;
is(random_string_from("", 0), "",
"0 length random_string_from an empty string");
-eval { random_string_from("", 5) };
-like($@, qr/invalid letter list/,
- "random_string_from an empty string");
+throws_ok { random_string_from("", 5) } qr/invalid letter list/,
+ "random_string_from an empty string";
is(random_string_from("abcde", 0), "",
"0 length random_string_from");
my @letters = qw/a b c d e/;