2 # This is automatically generated by author/import-moose-test.pl.
3 # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4 use t::lib::MooseCompat;
7 $TODO = q{Mouse is not yet completed};
15 package Arbitrary::Roll;
19 my $method_meta = Mouse::Meta::Class->create_anon_class(
20 superclasses => ['Mouse::Meta::Method'],
21 roles => ['Arbitrary::Roll'],
24 # For comparing identity without actually keeping $original_meta around
25 my $original_meta = "$method_meta";
27 my $method_class = $method_meta->name;
29 my $method_object = $method_class->wrap(
31 associated_metaclass => Ball->meta,
32 package_name => 'Ball',
36 Ball->meta->add_method( bounce => $method_object );
39 is( Ball->bounce, 'ok', "method still exists on Ball" );
40 is( Ball->meta->get_method('bounce')->meta->name, $method_class,
41 "method's package still exists" );
43 is( Ball->meta->get_method('bounce'), $method_object,
44 'original method object is preserved' );
46 is( Ball->meta->get_method('bounce')->meta . '', $original_meta,
47 "method's metaclass still exists" );
48 ok( Ball->meta->get_method('bounce')->meta->does_role('Arbitrary::Roll'),
49 "method still does Arbitrary::Roll" );