2 # This is automatically generated by author/import-moose-test.pl.
3 # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4 use t::lib::MooseCompat;
14 use Mouse::Deprecated -api_version => '1.07';
25 lives_ok { Foo->new( x => {} ) }
26 'Setting coerce => 1 without a coercion on the type does not cause an error in the constructor';
28 lives_ok { Foo->new->x( {} ) }
29 'Setting coerce => 1 without a coercion on the type does not cause an error when setting the attribut';
31 throws_ok { Foo->new( x => 42 ) }
32 qr/\QAttribute (x) does not pass the type constraint because/,
33 'Attempting to provide an invalid value to the constructor for this attr still fails';
35 throws_ok { Foo->new->x(42) }
36 qr/\QAttribute (x) does not pass the type constraint because/,
37 'Attempting to provide an invalid value to the accessor for this attr still fails';