bloddy empty hashrefs
[gitmo/Role-Tiny.git] / t / role-tiny-composition.t
1 use strictures 1;
2 use Test::More;
3 use Test::Fatal;
4
5 {
6   package R1;
7   use Role::Tiny;
8
9   sub foo {}
10
11   $INC{"R1.pm"} = __FILE__;
12 }
13
14 {
15   package R2;
16   use Role::Tiny;
17
18   sub foo {}
19
20   $INC{"R2.pm"} = __FILE__;
21 }
22
23 {
24   package X;
25   sub new {
26       bless {} => shift
27   }
28 }
29
30 ok(exception { Role::Tiny->apply_roles_to_object(X->new, "R1", "R2") }, 'apply conflicting roles to object');
31
32 done_testing;