X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F035-apply-roles-to-roles.t;h=bae8e0e09f81b00d87c5c082bf3e6fed2950cc0a;hb=92583b3320b6ed8b4673fc94e68af64b3cf106e3;hp=a6842d504b0228be9fe0b973cb88bb625e3862b4;hpb=b1b8155380073bc8170b50b17893474865604300;p=gitmo%2FMouse.git diff --git a/t/035-apply-roles-to-roles.t b/t/035-apply-roles-to-roles.t index a6842d5..bae8e0e 100644 --- a/t/035-apply-roles-to-roles.t +++ b/t/035-apply-roles-to-roles.t @@ -1,10 +1,11 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More tests => 5; { package Animal; use Mouse::Role; + requires 'bark'; sub eat { 'delicious' } has food => ( is => 'ro' ); } @@ -19,6 +20,7 @@ use Test::More tests => 4; package Chihuahua; use Mouse; with 'Dog'; + sub bark { 'bow-wow' } } ok !Animal->can('food'); @@ -27,4 +29,5 @@ ok !Dog->can('food'); my $c = Chihuahua->new(food => 'bone'); is $c->eat(), 'delicious'; is $c->food(), 'bone'; +is $c->bark(), 'bow-wow';