From: Rafael Kitover Date: Thu, 11 Feb 2010 22:48:01 +0000 (-0500) Subject: test that anon classes are the same for instances having the same roles applied in... X-Git-Tag: 0.99~17 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=11e1ad08661bc58afba6ef8b5c349f9aad0a7d12;p=gitmo%2FMoose.git test that anon classes are the same for instances having the same roles applied in the same order --- diff --git a/t/030_roles/010_run_time_role_composition.t b/t/030_roles/010_run_time_role_composition.t index fbc3937..a1dfd7c 100644 --- a/t/030_roles/010_run_time_role_composition.t +++ b/t/030_roles/010_run_time_role_composition.t @@ -100,4 +100,14 @@ isa_ok($obj2, 'My::Class'); isnt(blessed($obj), blessed($obj2), '... they still don\'t share the same anon-class/role thing'); } +# test that anon classes are equivalent after role composition in the same order +{ + foreach ($obj, $obj2) { + $_ = My::Class->new; + Bark->meta->apply($_); + Sleeper->meta->apply($_); + } + is(blessed($obj), blessed($obj2), '... they now share the same anon-class/role thing'); +} + done_testing;