8 use Test::Moose qw( with_immutable );
11 'Test::Output' => '0.01',
21 stderr_like { Baz->new( x => 42, 'y' ) }
22 qr{\QThe new() method for Baz expects a hash reference or a key/value list. You passed an odd number of arguments at $0 line \E\d+},
23 'warning when passing an odd number of args to new()';
25 stderr_unlike { Baz->new( x => 42, 'y' ) }
26 qr{\QOdd number of elements in anonymous hash},
27 'we suppress the standard warning from Perl for an odd number of elements in a hash';
29 stderr_is { Baz->new( { x => 42 } ) }
31 'we handle a single hashref to new without errors';