X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=t%2F800_shikabased%2F013-compatibility-get_method_list.t;h=b2852c2d2da91b728b8a9946bd87676a64b8d8ff;hp=e75ce2674bdc300ab875b344d09c58a477eb31df;hb=3a63a2e7ef8fbac5f61eab04baecbf5d19374b83;hpb=8de42c413af07a9e26501c06d217383929d7f3d3 diff --git a/t/800_shikabased/013-compatibility-get_method_list.t b/t/800_shikabased/013-compatibility-get_method_list.t index e75ce26..b2852c2 100644 --- a/t/800_shikabased/013-compatibility-get_method_list.t +++ b/t/800_shikabased/013-compatibility-get_method_list.t @@ -1,7 +1,7 @@ use strict; use warnings; use Test::More; -plan skip_all => "This test requires Moose 0.68" unless eval { require Moose; Moose->VERSION(0.68); }; +plan skip_all => "This test requires Moose 0.81" unless eval { require Moose; Moose->VERSION(0.81); }; plan tests => 6; test($_) for qw/Moose Mouse/; @@ -12,12 +12,14 @@ sub test { eval <<"..."; { package ${class}Class; + use Carp; # import external functions (not our methods) use ${class}; sub foo { } no ${class}; } { package ${class}ClassImm; + use Carp; # import external functions (not our methods) use ${class}; sub foo { } no ${class}; @@ -25,13 +27,15 @@ sub test { } { package ${class}Role; + use Carp; # import external functions (not our methods) use ${class}::Role; sub bar { } + no ${class}::Role; } ... die $@ if $@; - is join(',', sort "${class}Class"->meta->get_method_list()), 'foo,meta'; - is join(',', sort "${class}ClassImm"->meta->get_method_list()), 'foo,meta,new'; - is join(',', sort "${class}Role"->meta->get_method_list()), 'bar'; + is join(',', sort "${class}Class"->meta->get_method_list()), 'foo,meta', "mutable $class"; + is join(',', sort "${class}ClassImm"->meta->get_method_list()), 'DESTROY,foo,meta,new', "immutable $class"; + is join(',', sort "${class}Role"->meta->get_method_list()), 'bar,meta', "role $class"; }