X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F030_roles%2F003_apply_role.t;h=2910669afe884376fb2dad12ee09b4647a2bad95;hb=0ffc4183de68b15deeec5d662d9cc1d125dabf26;hp=1ab9f3fce083d571a19c69e5f0350c4b1ef8edad;hpb=6719984210754e8d012ae678536f194c35000823;p=gitmo%2FMouse.git diff --git a/t/030_roles/003_apply_role.t b/t/030_roles/003_apply_role.t index 1ab9f3f..2910669 100755 --- a/t/030_roles/003_apply_role.t +++ b/t/030_roles/003_apply_role.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 86; +use Test::More; use Test::Exception; { @@ -17,7 +17,6 @@ use Test::Exception; sub foo {'FooRole::foo'} override 'boo' => sub { 'FooRole::boo -> ' . super() }; -# sub boo { 'FooRole::boo -> ' . shift->SUPER::boo() } around 'blau' => sub { my $c = shift; @@ -93,19 +92,15 @@ ok( !$foobar_class_meta->does_role('OtherRole'), '... the FooBarClass->meta !does_role OtherRole' ); foreach my $method_name (qw(bar baz foo boo blau goo)) { -# ok( $foo_class_meta->has_method($method_name), ## Mouse: no ->has_method - ok( FooClass->can($method_name), + ok( $foo_class_meta->has_method($method_name), '... FooClass has the method ' . $method_name ); -# ok( $foobar_class_meta->has_method($method_name), ## Mouse: no ->has_method - ok( FooClass->can($method_name), + ok( $foobar_class_meta->has_method($method_name), '... FooBarClass has the method ' . $method_name ); } -#ok( !$foo_class_meta->has_method('woot'), ## Mouse: no ->has_method -ok( !FooClass->can('woot'), +ok( !$foo_class_meta->has_method('woot'), '... FooClass lacks the method woot' ); -#ok( $foobar_class_meta->has_method('woot'), ## Mouse: no ->has_method -ok( FooBarClass->can('woot'), +ok( $foobar_class_meta->has_method('woot'), '... FooBarClass has the method woot' ); foreach my $attr_name (qw(bar baz)) { @@ -188,3 +183,5 @@ foreach my $foo ( $foo, $foobar ) { is( $foo->bar, $foo2, '... got the right value for bar now' ); } + +done_testing;