X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F010-required.t;h=e6a69909d2729459ad12a6b55135c4fcbd3ae75c;hb=f9aca0f35658e5e0657e8ce78b783c0185d59969;hp=3a8be4c43ca80695d06bd0e183fd823442a8ec39;hpb=c3398f5bd45f2851b7cd40ca9823bcf7d2378469;p=gitmo%2FMouse.git diff --git a/t/010-required.t b/t/010-required.t index 3a8be4c..e6a6990 100644 --- a/t/010-required.t +++ b/t/010-required.t @@ -9,15 +9,18 @@ do { use Mouse; has foo => ( + is => 'bare', required => 1, ); has bar => ( + is => 'bare', required => 1, default => 50, ); has baz => ( + is => 'bare', required => 1, default => sub { 10 }, ); @@ -30,7 +33,7 @@ do { ); }; -throws_ok { Class->new } qr/Attribute 'foo' is required/, "required attribute is required"; +throws_ok { Class->new } qr/Attribute \(foo\) is required/, "required attribute is required"; lives_ok { Class->new(foo => 5) } "foo is the only required but unfulfilled attribute"; lives_ok { Class->new(foo => 1, bar => 1, baz => 1, quux => 1) } "all attributes specified";