X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F150-composite-role-application.t;fp=t%2F150-composite-role-application.t;h=1e2e203a9486984a04002cae45fc9b7e8267b55a;hb=6c2c483057635b2a35c2f03670fbeeb1b26a5568;hp=fcf446054b10e0a5650c52cbb50b2522cfdd6289;hpb=bfac2339a5b1a32f8b718660e9baf22edc1b59d6;p=gitmo%2FMooseX-Role-Parameterized.git diff --git a/t/150-composite-role-application.t b/t/150-composite-role-application.t index fcf4460..1e2e203 100644 --- a/t/150-composite-role-application.t +++ b/t/150-composite-role-application.t @@ -2,7 +2,7 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More tests => 7; use Test::Exception; do { @@ -18,7 +18,7 @@ do { my $p = shift; has $p->attribute => ( - is => 'Int', + is => 'rw', ); }; }; @@ -78,12 +78,13 @@ do { do { package MyExtendedConsumer; use Moose; - with MyCompositeRoleA => { attribute => 'bar' }, + with MyCompositeRoleA => { attribute => 'baz' }, MyExtendingRole => { foo => 23 }; }; TODO: { local $TODO = "role-role application for parameterized roles doesn't work yet"; + ok(MyExtendedConsumer->can('baz'), 'role composed directly applied successfully'); ok(MyExtendedConsumer->can('bar'), 'role composed through other role applied successfully'); is(eval { MyExtendedConsumer->new->foo }, 23, 'role composing other role applied successfully'); };;