X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F030_roles%2F017_extending_role_attrs.t;h=c34d9c91ef2d2cb86939eace075acbd59b6927f5;hb=576cd474fc09bba92843e299a33dd2634629a930;hp=df01d3db02e9b59f8fc2466c8517be10a72f6ff9;hpb=d03bd989b97597428b460d7f9a021e2931893fa0;p=gitmo%2FMoose.git diff --git a/t/030_roles/017_extending_role_attrs.t b/t/030_roles/017_extending_role_attrs.t index df01d3d..c34d9c9 100644 --- a/t/030_roles/017_extending_role_attrs.t +++ b/t/030_roles/017_extending_role_attrs.t @@ -3,11 +3,10 @@ use strict; use warnings; -use Test::More tests => 27; +use Test::More; use Test::Exception; - =pod This basically just makes sure that using +name @@ -151,6 +150,7 @@ is_deeply($quux->quux, ["hi"], "... still has the old ArrayRef value"); for (1..3) { has "err$_" => ( isa => 'Str | Int', + is => 'bare', ); } @@ -172,3 +172,16 @@ is_deeply($quux->quux, ["hi"], "... still has the old ArrayRef value"); } "or add new types to the union"; } +{ + package Role::With::PlusAttr; + use Moose::Role; + + with 'Foo::Role'; + + ::throws_ok { + has '+bar' => ( is => 'ro' ); + } qr/has '\+attr' is not supported in roles/, + "Test has '+attr' in roles explodes"; +} + +done_testing;