From: Dave Rolsky Date: Sat, 17 Sep 2011 02:15:11 +0000 (-0500) Subject: Ignore methods from UNIVERSAL in test X-Git-Tag: 2.0300~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a6311f88c1bcd1973e268105311c3c7b3d9a061a;p=gitmo%2FMoose.git Ignore methods from UNIVERSAL in test --- diff --git a/t/cmop/advanced_methods.t b/t/cmop/advanced_methods.t index dbc681b..edfb3c3 100644 --- a/t/cmop/advanced_methods.t +++ b/t/cmop/advanced_methods.t @@ -69,7 +69,11 @@ is(Class::MOP::Class->initialize('Foo::Bar::Baz')->find_next_method_by_name('BUI '... Foo::Bar::Baz->BUILD does have a next method'); is_deeply( - [ sort { $a->name cmp $b->name } Class::MOP::Class->initialize('Foo')->get_all_methods() ], + [ + sort { $a->name cmp $b->name } + grep { $_->package_name ne 'UNIVERSAL' } + Class::MOP::Class->initialize('Foo')->get_all_methods() + ], [ Class::MOP::Class->initialize('Foo')->get_method('BUILD') , Class::MOP::Class->initialize('Foo')->get_method('foo'), @@ -77,7 +81,11 @@ is_deeply( '... got the right list of applicable methods for Foo'); is_deeply( - [ sort { $a->name cmp $b->name } Class::MOP::Class->initialize('Bar')->get_all_methods() ], + [ + sort { $a->name cmp $b->name } + grep { $_->package_name ne 'UNIVERSAL' } + Class::MOP::Class->initialize('Bar')->get_all_methods() + ], [ Class::MOP::Class->initialize('Bar')->get_method('BUILD'), Class::MOP::Class->initialize('Bar')->get_method('bar'), @@ -87,7 +95,11 @@ is_deeply( is_deeply( - [ sort { $a->name cmp $b->name } Class::MOP::Class->initialize('Baz')->get_all_methods() ], + [ + sort { $a->name cmp $b->name } + grep { $_->package_name ne 'UNIVERSAL' } + Class::MOP::Class->initialize('Baz')->get_all_methods() + ], [ Class::MOP::Class->initialize('Bar')->get_method('BUILD'), Class::MOP::Class->initialize('Bar')->get_method('bar'), @@ -97,7 +109,11 @@ is_deeply( '... got the right list of applicable methods for Baz'); is_deeply( - [ sort { $a->name cmp $b->name } Class::MOP::Class->initialize('Foo::Bar')->get_all_methods() ], + [ + sort { $a->name cmp $b->name } + grep { $_->package_name ne 'UNIVERSAL' } + Class::MOP::Class->initialize('Foo::Bar')->get_all_methods() + ], [ Class::MOP::Class->initialize('Foo::Bar')->get_method('BUILD'), Class::MOP::Class->initialize('Bar')->get_method('bar'),