Move is_valid_class_name into XS
[gitmo/Mouse.git] / t / 001_mouse / 056-role-combine.t
CommitLineData
346a3ab8 1#!perl
2use strict;
3use warnings;
4use Test::More tests => 2;
5use Test::Exception;
6{
7 package RoleA;
8 use Mouse::Role;
9
10 sub foo { }
11 sub bar { }
12}
13{
14 package RoleB;
15 use Mouse::Role;
16
17 sub foo { }
18 sub bar { }
19}
20{
21 package Class;
22 use Mouse;
23 use Test::More;
24 use Test::Exception;
25
26 throws_ok {
27 with qw(RoleA RoleB);
28 } qr/Due to method name conflicts in roles 'RoleA' and 'RoleB', the methods 'bar' and 'foo' must be/;
29
30 lives_ok {
31 with RoleA => { -excludes => ['foo'] },
32 RoleB => { -excludes => ['bar'] },
33 ;
34 };
35}