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;
8 $TODO = q{Mouse is not yet completed};
15 sub a_role_method { 'foo' }
29 my $instance_with_role1 = Foo->new;
30 MyRole1->meta->apply($instance_with_role1);
32 my $instance_with_role2 = Foo->new;
33 MyRole2->meta->apply($instance_with_role2);
35 ok ((not $instance_with_role2->does('MyRole1')),
36 'instance does not have the wrong role');
38 ok ((not $instance_with_role2->can('a_role_method')),
39 'instance does not have methods from the wrong role');
41 ok (($instance_with_role1->does('MyRole1')),
42 'role was applied to the correct instance');
45 is $instance_with_role1->a_role_method, 'foo'
46 } 'instance has correct role method';