Commit | Line | Data |
346a3ab8 |
1 | #!perl |
2 | use strict; |
3 | use warnings; |
4 | use Test::More tests => 2; |
5 | use Test::Exception; |
6 | { |
7 | package RoleA; |
8 | use Mouse::Role; |
9 | |
10 | sub foo { } |
11 | sub bar { } |
12 | } |
13 | { |
14 | package RoleB; |
15 | use Mouse::Role; |
16 | |
17 | sub foo { } |
18 | sub bar { } |
19 | } |
20 | { |
21 | package Class; |
22 | use Mouse; |
23 | use Test::More; |
24 | use Test::Exception; |
25 | |
26 | throws_ok { |
27 | with qw(RoleA RoleB); |
28 | } qr/Due to method name conflicts in roles 'RoleA' and 'RoleB', the methods 'bar' and 'foo' must be/; |
29 | |
30 | lives_ok { |
31 | with RoleA => { -excludes => ['foo'] }, |
32 | RoleB => { -excludes => ['bar'] }, |
33 | ; |
34 | }; |
35 | } |