From: Graham Knop Date: Thu, 21 Feb 2013 11:34:39 +0000 (-0500) Subject: test for rt#83508, inflated metaclass sometimes forgetting role methods X-Git-Tag: v1.001000~14 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f215e66cc6279ccf3562b8c64edff35aa4aeadff;p=gitmo%2FMoo.git test for rt#83508, inflated metaclass sometimes forgetting role methods --- diff --git a/xt/moose-does-moo-role.t b/xt/moose-does-moo-role.t index 6590511..2330b30 100644 --- a/xt/moose-does-moo-role.t +++ b/xt/moose-does-moo-role.t @@ -18,10 +18,14 @@ use Moo::HandleMoose; use Moo; with 'MooRole'; + has 'some_attr' => (is => 'ro'); + package MooRoledMooseClass; use Moose; with 'MooRole'; + has 'some_attr' => (is => 'ro'); + package MooseParent; use Moose; @@ -50,6 +54,8 @@ for my $parent (qw(MooseParent MooParent)) { ok( $o->e->does("MooParentRole"), "$child does parent MooRole" ); can_ok( $o->e, "role_method" ); can_ok( $o->e, "parent_role_method" ); + ok($o->e->meta->has_method('role_method'), 'Moose knows about role_method'); + ok($o->e->meta->has_method('parent_role_method'), 'Moose knows about parent_role_method'); }; } }