From: Shawn M Moore Date: Thu, 7 May 2009 02:34:48 +0000 (-0400) Subject: Fix some composite role application tests X-Git-Tag: 0.06~15 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Role-Parameterized.git;a=commitdiff_plain;h=6c2c483057635b2a35c2f03670fbeeb1b26a5568 Fix some composite role application tests --- 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'); };;