X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=t%2F030_roles%2F003_apply_role.t;fp=t%2F030_roles%2F003_apply_role.t;h=b4d2b3889b8cc32fe9bff2d9179d7efe0e29541f;hp=3aaee4fd90c97173e7c4a3ed26e449491a6a9fb8;hb=6cfa1e5e70616fb102915489c02d8347ffa912fb;hpb=4f9945f5a128e120049ce8a7a30cf469d1568b9b diff --git a/t/030_roles/003_apply_role.t b/t/030_roles/003_apply_role.t index 3aaee4f..b4d2b38 100755 --- a/t/030_roles/003_apply_role.t +++ b/t/030_roles/003_apply_role.t @@ -2,18 +2,8 @@ use strict; use warnings; -use Test::More; -BEGIN { - plan skip_all => - "This test requires Class::Method::Modifiers or Class::Method::Modifiers::Fast" - unless eval { - require Class::Method::Modifiers::Fast; - } or eval { - require Class::Method::Modifiers; - }; -} -plan tests => 86; +use Test::More tests => 86; use Test::Exception; { @@ -27,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; @@ -103,19 +92,16 @@ 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), + #use Data::Dumper; $Data::Dumper::Maxdepth=1; diag(Dumper $foo_class_meta->{methods}); + 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)) {