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;
10 $TODO = q{Mouse is not yet completed};
17 sub foo { (caller(0))[3] }
28 my $meth = ClassA->meta->get_method('foo');
29 ok( $meth, 'ClassA has a foo method' );
30 isa_ok( $meth, 'Mouse::Meta::Method' );
31 is( $meth->original_method, Role::Foo->meta->get_method('foo'),
32 'ClassA->foo was cloned from Role::Foo->foo' );
33 is( $meth->fully_qualified_name, 'ClassA::foo',
34 'fq name is ClassA::foo' );
35 is( $meth->original_fully_qualified_name, 'Role::Foo::foo',
36 'original fq name is Role::Foo::foo' );
48 my $meth = Role::Bar->meta->get_method('foo');
49 ok( $meth, 'Role::Bar has a foo method' );
50 is( $meth->original_method, Role::Foo->meta->get_method('foo'),
51 'Role::Bar->foo was cloned from Role::Foo->foo' );
52 is( $meth->fully_qualified_name, 'Role::Bar::foo',
53 'fq name is Role::Bar::foo' );
54 is( $meth->original_fully_qualified_name, 'Role::Foo::foo',
55 'original fq name is Role::Foo::foo' );
66 my $meth = ClassB->meta->get_method('foo');
67 ok( $meth, 'ClassB has a foo method' );
68 is( $meth->original_method, Role::Bar->meta->get_method('foo'),
69 'ClassA->foo was cloned from Role::Bar->foo' );
70 is( $meth->original_method->original_method, Role::Foo->meta->get_method('foo'),
71 '... which in turn was cloned from Role::Foo->foo' );
72 is( $meth->fully_qualified_name, 'ClassB::foo',
73 'fq name is ClassA::foo' );
74 is( $meth->original_fully_qualified_name, 'Role::Foo::foo',
75 'original fq name is Role::Foo::foo' );
78 isnt( ClassA->foo, "ClassB::foo", "ClassA::foo is not confused with ClassB::foo");
80 is( ClassB->foo, 'Role::Foo::foo', 'ClassB::foo knows its name' );
81 is( ClassA->foo, 'Role::Foo::foo', 'ClassA::foo knows its name' );