support alias option on 'with'
[gitmo/Mouse.git] / t / 035-apply-roles-to-roles.t
index a6842d5..bae8e0e 100644 (file)
@@ -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';