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=2b6530a579588ca4d9bb1a798869cda2c3c1601a;hb=5f1c280839c7864938a8ddcd4c268d0c2719652e;hpb=d1fb4964131483996fda36e86c7fa29af99a2a92 diff --git a/t/aggregate/unit_core_script_help.t b/t/aggregate/unit_core_script_help.t index 2b6530a..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"; @@ -11,26 +10,20 @@ use lib "$Bin/../lib"; package TestHelpScript; use Moose; with 'Catalyst::ScriptRole'; - __PACKAGE__->meta->get_attribute('help')->cmd_aliases('h'); our $help; - sub _exit_with_usage { $help++ } + sub print_usage_text { $help++ } } -test('-h'); test('--help'); - -TODO: { - local $TODO = 'This is bork'; - test('-?'); -} +test('-?'); sub test { local $TestHelpScript::help; local @ARGV = (@_); - lives_ok { + is exception { TestHelpScript->new_with_options(application_name => 'TestAppToTestScripts')->run; - }; - ok $TestHelpScript::help; + }, undef, 'Lives'; + ok $TestHelpScript::help, 'Got help'; } done_testing;