bump version
[gitmo/Moo.git] / t / buildargs-error.t
CommitLineData
f6f646d5 1use strictures 1;
2use Test::More;
09233107 3use Test::Fatal;
f6f646d5 4
5{
6 package Foo;
7 use Moo;
8
9 has bar => ( is => "rw" );
10 has baz => ( is => "rw" );
11
12 sub BUILDARGS {
13 my ($self, $args) = @_;
14
15 return %$args
16 }
17}
18
09233107 19like(
20 exception { Foo->new({ bar => 1, baz => 1 }) },
21 qr/BUILDARGS did not return a hashref/,
22 'Sensible error message'
23);
f6f646d5 24
25done_testing;
26