use warnings;
use Test::More;
-use Test::Exception;
+use Test::Fatal;
BEGIN {
use_ok("Moose::Util::TypeConstraints");
}
-lives_ok {
+is( exception {
subtype 'MyCollections' => as 'ArrayRef | HashRef';
-} '... created the subtype special okay';
+}, undef, '... created the subtype special okay' );
{
my $t = find_type_constraint('MyCollections');
ok(!$t->check(1), '... validated it correctly');
}
-lives_ok {
+is( exception {
subtype 'MyCollectionsExtended'
=> as 'ArrayRef|HashRef'
=> where {
}
1;
};
-} '... created the subtype special okay';
+}, undef, '... created the subtype special okay' );
{
my $t = find_type_constraint('MyCollectionsExtended');