X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F100-meta-class.t;h=c76b2dae3fcfec3d191e45833696abfaf3b17390;hb=62225dfe344ee4caa7706570303159a775c07273;hp=7a921bb34e034b98c0bc70c8f0e266346151f7c8;hpb=8e64d0fa5da64639074f77d3da9b2f7aa20cce93;p=gitmo%2FMouse.git diff --git a/t/100-meta-class.t b/t/100-meta-class.t index 7a921bb..c76b2da 100644 --- a/t/100-meta-class.t +++ b/t/100-meta-class.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 22; +use Test::More tests => 26; use Test::Exception; { package Class; @@ -96,3 +96,18 @@ ok($child_meta->has_method('child_method')); is( join(' ', sort $child_meta->get_method_list), join(' ', sort qw(meta bishop child_method)) ); + +can_ok($child_meta, 'find_method_by_name'); +is $child_meta->find_method_by_name('child_method')->fully_qualified_name, 'Child::child_method'; +is $child_meta->find_method_by_name('pawn')->fully_qualified_name, 'Class::pawn'; + +{ + local $TODO = 'should be Class::MY_CONST'; + is( join(' ', sort map{ $_->fully_qualified_name } grep{ $_->package_name ne 'Mouse::Object' } $child_meta->get_all_methods), + join(' ', sort qw( + Child::bishop Child::child_method Child::meta + + Class::MY_CONST Class::has_pawn Class::pawn Class::stub Class::stub_with_attr + )) + ); +}