X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F010_basics%2F022_buildargs_warning.t;h=978800a7758c9b9bdf06b9111bfede2790744d6b;hb=b10dde3a27c11623547417c599ccbd4f92e42651;hp=7c99849ffcbcdbcd86c249e1963a221f01cc9340;hpb=d4e538d9bf46d1c14d2ecfd36ac35ed541ae7ee6;p=gitmo%2FMoose.git diff --git a/t/010_basics/022_buildargs_warning.t b/t/010_basics/022_buildargs_warning.t index 7c99849..978800a 100644 --- a/t/010_basics/022_buildargs_warning.t +++ b/t/010_basics/022_buildargs_warning.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::Exception; +use Test::Fatal; use Test::More; use Test::Moose qw( with_immutable ); @@ -17,7 +17,7 @@ use Test::Requires { } with_immutable { - lives_and { + is( exception { stderr_like { Baz->new( x => 42, 'y' ) } qr{\QThe new() method for Baz expects a hash reference or a key/value list. You passed an odd number of arguments at t/010_basics/022_buildargs_warning.t line \E\d+}, 'warning when passing an odd number of args to new()'; @@ -29,7 +29,7 @@ with_immutable { stderr_is { Baz->new( { x => 42 } ) } q{}, 'we handle a single hashref to new without errors'; - }; + }, undef ); } 'Baz';