Commit | Line | Data |
6cfa1e5e |
1 | #!/usr/bin/perl |
2 | use strict; |
3 | use warnings; |
4 | |
5 | use Test::More tests => 2; |
6 | use Test::Exception; |
7 | |
8 | { |
9 | package Bomb; |
10 | use Mouse::Role; |
11 | |
12 | sub fuse { } |
13 | sub explode { } |
14 | |
15 | package Spouse; |
16 | use Mouse::Role; |
17 | |
18 | sub fuse { } |
19 | sub explode { } |
20 | |
21 | package Caninish; |
22 | use Mouse::Role; |
23 | |
24 | sub bark { } |
25 | |
26 | package Treeve; |
27 | use Mouse::Role; |
28 | |
29 | sub bark { } |
30 | } |
31 | |
32 | package PracticalJoke; |
33 | use Mouse; |
34 | |
35 | ::throws_ok { |
36 | with 'Bomb', 'Spouse'; |
37 | } qr/Due to method name conflicts in roles 'Bomb' and 'Spouse', the methods 'explode' and 'fuse' must be implemented or excluded by 'PracticalJoke'/; |
38 | |
39 | ::throws_ok { |
40 | with ( |
41 | 'Bomb', 'Spouse', |
42 | 'Caninish', 'Treeve', |
43 | ); |
44 | } qr/Due to a method name conflict in roles 'Caninish' and 'Treeve', the method 'bark' must be implemented or excluded by 'PracticalJoke'/; |
45 | |