9 # This tests the error handling in Moose::Object only
16 like exception { Foo->new('bad') }, qr/^\QSingle parameters to new() must be a HASH ref/,
17 'A single non-hashref arg to a constructor throws an error';
18 like exception { Foo->new(undef) }, qr/^\QSingle parameters to new() must be a HASH ref/,
19 'A single non-hashref arg to a constructor throws an error';
21 like exception { Foo->does() }, qr/^\QYou must supply a role name to does()/,
22 'Cannot call does() without a role name';