X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Getopt.git;a=blobdiff_plain;f=t%2F104_override_usage.t;fp=t%2F104_override_usage.t;h=887844b9d9f1c60ddc8004a02a74a9120bb243ac;hp=d3d08685d979d546173ec122d974da53c058531d;hb=aabf4179f74c8607d8c9de5a1da07a5f2cb48b3b;hpb=d08ef824ff9b41efb8fbbc09fe6af178ef83080b diff --git a/t/104_override_usage.t b/t/104_override_usage.t index d3d0868..887844b 100644 --- a/t/104_override_usage.t +++ b/t/104_override_usage.t @@ -1,7 +1,7 @@ use strict; use warnings; use Test::More 0.88; -use Test::Exception; +use Test::Fatal; { package MyScript; @@ -29,13 +29,13 @@ use Test::Exception; { local $MyScript::usage; local @MyScript::warnings; local @MyScript::exception; local @ARGV = ('--help'); - throws_ok { MyScript->new_with_options } qr/A foo/; + like exception { MyScript->new_with_options }, qr/A foo/; is $MyScript::usage, 1; } { local $MyScript::usage; local @MyScript::warnings; local @MyScript::exception; local @ARGV = ('-q'); # Does not exist - throws_ok { MyScript->new_with_options } qr/A foo/; + like exception { MyScript->new_with_options }, qr/A foo/; is_deeply \@MyScript::warnings, [ 'Unknown option: q '