Add another MOOSE_TEST_MD option, MooseX
[gitmo/Moose.git] / t / roles / conflict_many_methods.t
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 use Test::More;
6 use Test::Fatal;
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 {
33     package PracticalJoke;
34     use Moose;
35
36     ::like( ::exception {
37         with 'Bomb', 'Spouse';
38     }, qr/Due to method name conflicts in roles 'Bomb' and 'Spouse', the methods 'explode' and 'fuse' must be implemented or excluded by 'PracticalJoke'/ );
39
40     ::like( ::exception {
41         with (
42             'Bomb', 'Spouse',
43             'Caninish', 'Treeve',
44         );
45     }, qr/Due to a method name conflict in roles 'Caninish' and 'Treeve', the method 'bark' must be implemented or excluded by 'PracticalJoke'/ );
46 }
47
48 done_testing;