X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Faggregate%2Funit_core_script_help.t;h=e2fc4a2bcfb1d2298584078529506c0ab12e14aa;hp=0287990d338f5b5a04d068bd415cd60e83990b09;hb=88e5a8b0c4d28e46b8ba6b6b9567063e57af9063;hpb=3a8c155fa0077e949f68f29fbe4b835d5484a2c9 diff --git a/t/aggregate/unit_core_script_help.t b/t/aggregate/unit_core_script_help.t index 0287990..e2fc4a2 100644 --- a/t/aggregate/unit_core_script_help.t +++ b/t/aggregate/unit_core_script_help.t @@ -1,8 +1,7 @@ -#!/usr/bin/env perl use strict; use warnings; use Test::More; -use Test::Exception; +use Test::Fatal; use FindBin qw/$Bin/; use lib "$Bin/../lib"; @@ -12,19 +11,18 @@ use lib "$Bin/../lib"; use Moose; with 'Catalyst::ScriptRole'; our $help; - sub _getopt_full_usage { $help++ } + sub print_usage_text { $help++ } } -test('-h'); test('--help'); test('-?'); sub test { local $TestHelpScript::help; local @ARGV = (@_); - lives_ok { + is exception { TestHelpScript->new_with_options(application_name => 'TestAppToTestScripts')->run; - } 'Lives'; + }, undef, 'Lives'; ok $TestHelpScript::help, 'Got help'; }