Commit | Line | Data |
---|---|---|
1389deda | 1 | use strict; |
2 | use warnings; | |
3 | ||
4 | use Test::More; | |
be0ed157 | 5 | use Test::Fatal; |
1389deda | 6 | |
7 | { | |
8 | package My::Role1; | |
9 | use Moose::Role; | |
10 | ||
11 | has foo => ( | |
12 | is => 'ro', | |
13 | ); | |
14 | ||
15 | } | |
16 | ||
17 | { | |
18 | package My::Role2; | |
19 | use Moose::Role; | |
20 | ||
21 | has foo => ( | |
22 | is => 'ro', | |
23 | ); | |
24 | ||
be0ed157 | 25 | ::like ::exception { with 'My::Role1' }, qr/attribute conflict.+My::Role2.+foo/, |
1389deda | 26 | 'attribute conflict when composing one role into another'; |
27 | } | |
28 | ||
29 | done_testing; |