From: Dave Rolsky Date: Sun, 19 Feb 2012 20:08:42 +0000 (-0600) Subject: Expect applying the same role >1 time to be a no-op X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMoose.git;a=commitdiff_plain;h=e5db49708c176670c958246b3eb95e622cbcbe47 Expect applying the same role >1 time to be a no-op --- diff --git a/t/moose_util/ensure_all_roles.t b/t/moose_util/ensure_all_roles.t index ec33b73..d4bbf68 100644 --- a/t/moose_util/ensure_all_roles.t +++ b/t/moose_util/ensure_all_roles.t @@ -40,7 +40,7 @@ Foo->meta->apply(Quux->meta); Bar->meta->apply(Quux->meta); is_deeply( Quux->meta->roles, - [ Foo->meta, Foo->meta, Bar->meta ], + [ Foo->meta, Bar->meta ], "duplicated Foo", ); @@ -49,7 +49,7 @@ is(does_role('Quux', 'Bar'), 1, "Quux does Bar"); ensure_all_roles('Quux', qw(Foo Bar)); is_deeply( Quux->meta->roles, - [ Foo->meta, Foo->meta, Bar->meta ], + [ Foo->meta, Bar->meta ], "unchanged, since all roles are already applied", ); @@ -57,7 +57,7 @@ my $obj = Quux->new; ensure_all_roles($obj, qw(Foo Bar)); is_deeply( $obj->meta->roles, - [ Foo->meta, Foo->meta, Bar->meta ], + [ Foo->meta, Bar->meta ], "unchanged, since all roles are already applied", );