Commit | Line | Data |
---|---|---|
59089ec3 | 1 | #!perl |
2 | use strict; | |
3 | use warnings; | |
4 | use Test::More tests => 1; | |
eab81545 | 5 | use Test::Exception; |
59089ec3 | 6 | |
7 | { | |
8 | package Foo; | |
9 | use Mouse::Role; | |
10 | requires 'foo'; | |
11 | } | |
12 | ||
13 | throws_ok { | |
14 | package Bar; | |
15 | use Mouse; | |
16 | with 'Foo'; | |
17 | } qr/'Foo' requires the method 'foo' to be implemented by 'Bar'/; | |
18 | ||
19 | { | |
20 | package Baz; | |
21 | use Mouse; | |
22 | with 'Foo'; | |
23 | sub foo { } | |
24 | } | |
25 |