X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F100_bugs%2Ffailing%2F024_anon_method_metaclass.t;fp=t%2F100_bugs%2Ffailing%2F024_anon_method_metaclass.t;h=0000000000000000000000000000000000000000;hb=c47cf41554416ee1828eab17d31342a53aaa0839;hp=e8f639b8cd34893c338bae9accb2faee2f79819a;hpb=9864f0e4ba233c5f30ad6dc7c484ced43d883d27;p=gitmo%2FMouse.git diff --git a/t/100_bugs/failing/024_anon_method_metaclass.t b/t/100_bugs/failing/024_anon_method_metaclass.t deleted file mode 100644 index e8f639b..0000000 --- a/t/100_bugs/failing/024_anon_method_metaclass.t +++ /dev/null @@ -1,48 +0,0 @@ -use strict; -use warnings; -use Test::More tests => 10; - -{ - package Ball; - use Mouse; -} - -{ - package Arbitrary::Roll; - use Mouse::Role; -} - -my $method_meta = Mouse::Meta::Class->create_anon_class( - superclasses => ['Mouse::Meta::Method'], - roles => ['Arbitrary::Roll'], -); - -# For comparing identity without actually keeping $original_meta around -my $original_meta = "$method_meta"; - -my $method_class = $method_meta->name; - -my $method_object = $method_class->wrap( - sub {'ok'}, - associated_metaclass => Ball->meta, - package_name => 'Ball', - name => 'bounce', -); - -Ball->meta->add_method( bounce => $method_object ); - -for ( 1, 2 ) { - is( Ball->bounce, 'ok', "method still exists on Ball" ); - is( Ball->meta->get_method('bounce')->meta->name, $method_class, - "method's package still exists" ); - - is( Ball->meta->get_method('bounce'), $method_object, - 'original method object is preserved' ); - - is( Ball->meta->get_method('bounce')->meta . '', $original_meta, - "method's metaclass still exists" ); - ok( Ball->meta->get_method('bounce')->meta->does_role('Arbitrary::Roll'), - "method still does Arbitrary::Roll" ); - - undef $method_meta; -}