summaryrefslogtreecommitdiffstats
path: root/t/001-basic-matching.t
diff options
context:
space:
mode:
Diffstat (limited to 't/001-basic-matching.t')
-rw-r--r--t/001-basic-matching.t6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/001-basic-matching.t b/t/001-basic-matching.t
index c9c589c..52003ac 100644
--- a/t/001-basic-matching.t
+++ b/t/001-basic-matching.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 4;
+use Test::More tests => 5;
package Foo;
use Moose;
@@ -10,7 +10,6 @@ with 'MooseX::Role::Matcher';
has [qw/a b c/] => (
is => 'ro',
isa => 'Str',
- required => 1,
);
package main;
@@ -23,3 +22,6 @@ ok($foo->match(b => sub { length(shift) == 3 }),
'subroutine matching works');
ok($foo->match(a => 'foo', b => qr/a/, c => sub { substr(shift, 2) eq 'z' }),
'combined matching works');
+$foo = Foo->new(a => 'foo');
+ok($foo->match(a => 'foo', b => undef),
+ 'matching against undef works');