Remove our (now broken) dzil GatherDir subclass
[gitmo/Moose.git] / t / bugs / role_caller.t
CommitLineData
b6f7ee15 1package MyRole;
2
3use Moose::Role;
4
5sub foo { return (caller(0))[3] }
6
7no Moose::Role;
8
9package MyClass1; use Moose; with 'MyRole'; no Moose;
10package MyClass2; use Moose; with 'MyRole'; no Moose;
11
12package main;
13
a28e50e4 14use Test::More;
b6f7ee15 15
16{
d1135dbd 17 local $TODO = 'Role composition does not clone methods yet';
b6f7ee15 18 is(MyClass1->foo, 'MyClass1::foo',
19 'method from role has correct name in caller()');
d1135dbd 20 is(MyClass2->foo, 'MyClass2::foo',
21 'method from role has correct name in caller()');
b6f7ee15 22}
d1135dbd 23
24isnt(MyClass1->foo, "MyClass2::foo", "role method is not confused with other class" );
25isnt(MyClass2->foo, "MyClass1::foo", "role method is not confused with other class" );
a28e50e4 26
27done_testing;