From: Dave Rolsky Date: Sat, 17 Sep 2011 02:26:55 +0000 (-0500) Subject: Ignore methods from universal when counting methods X-Git-Tag: 2.0300~17 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=acf104964355eb72221f7639b1622a4e2b125e73;p=gitmo%2FMoose.git Ignore methods from universal when counting methods --- diff --git a/t/metaclasses/meta_name.t b/t/metaclasses/meta_name.t index db3d9ac..1bae8bd 100644 --- a/t/metaclasses/meta_name.t +++ b/t/metaclasses/meta_name.t @@ -37,7 +37,10 @@ isa_ok(Bar->bar_meta->get_method('bar_meta'), 'Moose::Meta::Method::Meta'); no Moose; } ok(!Baz->can('meta')); + +my $universal_method_count = scalar Class::MOP::class_of('UNIVERSAL')->get_all_methods; # 1 because of the dummy method we installed in Base -is(scalar Class::MOP::class_of('Baz')->get_all_methods, 1); +is( ( scalar Class::MOP::class_of('Baz')->get_all_methods ) + - $universal_method_count, 1 ); done_testing;