Fix a test to remove the dependency on the order of keys/values. Sort the values...
[gitmo/Moose.git] / t / 030_roles / 043_conflict_many_methods.t
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 Moose::Role;
11
12     sub fuse { }
13     sub explode { }
14
15     package Spouse;
16     use Moose::Role;
17
18     sub fuse { }
19     sub explode { }
20
21     package Caninish;
22     use Moose::Role;
23
24     sub bark { }
25
26     package Treeve;
27     use Moose::Role;
28
29     sub bark { }
30 }
31
32 package PracticalJoke;
33 use Moose;
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 method name conflicts in roles 'Bomb' and 'Spouse', the methods 'explode' and 'fuse' must be implemented or excluded by 'PracticalJoke'/;
45