use warnings;
use Test::More;
-use Test::Fatal;
+use Test::Exception;
use Test::Moose;
{
}
with_immutable {
- ok ! exception { Foo->new( x => {} ) },
+ lives_ok { Foo->new( x => {} ) }
'Setting coerce => 1 without a coercion on the type does not cause an error in the constructor';
- ok ! exception { Foo->new->x( {} ) },
+ lives_ok { Foo->new->x( {} ) }
'Setting coerce => 1 without a coercion on the type does not cause an error when setting the attribut';
- like exception { Foo->new( x => 42 ) },
+ throws_ok { Foo->new( x => 42 ) }
qr/\QAttribute (x) does not pass the type constraint because/,
'Attempting to provide an invalid value to the constructor for this attr still fails';
- like exception { Foo->new->x(42) },
+ throws_ok { Foo->new->x(42) }
qr/\QAttribute (x) does not pass the type constraint because/,
'Attempting to provide an invalid value to the accessor for this attr still fails';
}