Commit | Line | Data |
---|---|---|
977a86ba | 1 | #!/usr/bin/perl |
2 | ||
3 | use strict; | |
4 | use warnings; | |
5 | ||
6 | use Test::More tests => 2; | |
7 | use Test::Exception; | |
8 | ||
9 | BEGIN { | |
10 | use_ok('Moose'); | |
11 | } | |
12 | ||
13 | { | |
14 | package My::Role; | |
15 | use Moose::Role; | |
16 | } | |
17 | { | |
18 | package My::Class; | |
19 | use Moose; | |
20 | ||
21 | ::throws_ok { | |
22 | extends 'My::Role'; | |
23 | } qr/You cannot inherit from a Moose Role \(My\:\:Role\)/, | |
24 | '... this croaks correctly'; | |
25 | } |