11 use Moose::Deprecated -api_version => '1.07';
22 lives_ok { Foo->new( x => {} ) }
23 'Setting coerce => 1 without a coercion on the type does not cause an error in the constructor';
25 lives_ok { Foo->new->x( {} ) }
26 'Setting coerce => 1 without a coercion on the type does not cause an error when setting the attribut';
28 throws_ok { Foo->new( x => 42 ) }
29 qr/\QAttribute (x) does not pass the type constraint because/,
30 'Attempting to provide an invalid value to the constructor for this attr still fails';
32 throws_ok { Foo->new->x(42) }
33 qr/\QAttribute (x) does not pass the type constraint because/,
34 'Attempting to provide an invalid value to the accessor for this attr still fails';