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