Add another MOOSE_TEST_MD option, MooseX
[gitmo/Moose.git] / t / bugs / native_trait_handles_bad_value.t
CommitLineData
da32bf87 1use strict;
2use warnings;
3
4use Test::More;
5use Test::Fatal;
6
7{
8
9 package Bug;
10 use Moose;
11
12 ::like(
13 ::exception{ has member => (
14 is => 'ro',
15 isa => 'HashRef',
16 traits => ['Hash'],
17 handles => {
18 method => sub { }
19 },
20 );
21 },
22 qr/\QAll values passed to handles must be strings or ARRAY references, not CODE/,
23 'bad value in handles throws a useful error'
24 );
25}
26
27done_testing;