From: Toby Inkster Date: Fri, 9 Nov 2012 16:35:59 +0000 (+0000) Subject: restore lives_and X-Git-Tag: v1.000007~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a328549b05af9ea2c00c7686542ec74a4e42e9d6;p=gitmo%2FMoo.git restore lives_and --- diff --git a/Changes b/Changes index fa108f3..a98a739 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,4 @@ - - + - Correctly handle methods dragged along by role composition - Die if Moo and Moo::Role are imported into the same package 1.000006 - 2012-11-16 diff --git a/xt/moose-does-moo-role.t b/xt/moose-does-moo-role.t index 163908c..6590511 100644 --- a/xt/moose-does-moo-role.t +++ b/xt/moose-does-moo-role.t @@ -43,12 +43,14 @@ use Moo::HandleMoose; for my $parent (qw(MooseParent MooParent)) { for my $child (qw(MooRoledMooClass MooRoledMooseClass)) { - my $o = $parent->new( - e => $child->new(), - ); - ok( $o->e->does("MooParentRole"), "$child does parent MooRole" ); - can_ok( $o->e, "role_method" ); - can_ok( $o->e, "parent_role_method" ); + lives_and { + my $o = $parent->new( + e => $child->new(), + ); + ok( $o->e->does("MooParentRole"), "$child does parent MooRole" ); + can_ok( $o->e, "role_method" ); + can_ok( $o->e, "parent_role_method" ); + }; } }