X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fconstructor.t;h=90e8ea1327a46dff51a9d33767049d074ba82e2c;hb=64c572f8a67500716757f45975103d58b9324e8c;hp=22d4ce216c526026316da15b5bef2606f75574a4;hpb=0dd9c65b0cd3941fe1901f40045e5fa6732e7692;p=gitmo%2FMooseX-UndefTolerant.git diff --git a/t/constructor.t b/t/constructor.t index 22d4ce2..90e8ea1 100644 --- a/t/constructor.t +++ b/t/constructor.t @@ -60,7 +60,9 @@ sub do_tests { my $obj = Foo->new(attr1 => undef); ok(!$obj->has_attr1, 'UT attr1 has no value when assigned undef in constructor'); - isnt (exception { $obj = Foo->new(attr2 => undef) }, undef, + like( + exception { $obj = Foo->new(attr2 => undef) }, + qr/\QAttribute (attr2) does not pass the type constraint because: Validation failed for 'Num' with value undef\E/, 'But assigning undef to attr2 generates a type constraint error'); is (exception { $obj = Foo->new(attr3 => undef) }, undef,