6 use Test::More tests => 4;
9 my $test1 = Moose::Meta::Class->create_anon_class;
10 $test1->add_method( 'foo1', sub { } );
12 my $t1 = $test1->new_object;
13 my $t1_am = $t1->meta->get_method('foo1')->associated_metaclass;
14 ok( $t1_am, 'associated_metaclass is defined' );
16 $t1_am, 'Moose::Meta::Class',
17 'associated_metaclass is correct class'
30 my $t2_am = $t2->meta->get_method('foo2')->associated_metaclass;
31 ok( $t2_am, 'associated_metaclass is defined' );
34 $t2_am, 'Moose::Meta::Class',
35 'associated_metaclass is correct class'