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_create.t;h=de09187c606ee8df142af0b2a91ce6b39c22644e;hp=d492fd98053f06628ad205d7a12607b2dd51d406;hb=2a56ace924b296189e0bf5864d6a3b92809fef66;hpb=5a4ce75eb7c71dc6d3190a2377d4aef3abd10c78 diff --git a/t/aggregate/unit_core_script_create.t b/t/aggregate/unit_core_script_create.t index d492fd9..de09187 100644 --- a/t/aggregate/unit_core_script_create.t +++ b/t/aggregate/unit_core_script_create.t @@ -2,7 +2,7 @@ use strict; use warnings; use Test::More; -use Test::Exception; +use Test::Fatal; use FindBin qw/$Bin/; use lib "$Bin/../lib"; @@ -41,9 +41,9 @@ use lib "$Bin/../lib"; { local $TestCreateScript::help; local @ARGV; - lives_ok { + is exception { TestCreateScript->new_with_options(application_name => 'TestAppToTestScripts', helper_class => 'TestHelperClass')->run; - } "no argv"; + }, undef, "no argv"; ok $TestCreateScript::help, 'Exited with usage info'; } { @@ -51,9 +51,9 @@ use lib "$Bin/../lib"; local @ARGV = 'foo'; local @TestHelperClass::ARGS; local %TestHelperClass::p; - lives_ok { + is exception { TestCreateScript->new_with_options(application_name => 'TestAppToTestScripts', helper_class => 'TestHelperClass')->run; - } "with argv"; + }, undef, "with argv"; ok !$TestCreateScript::help, 'Did not exit with usage into'; is_deeply \@TestHelperClass::ARGS, ['TestAppToTestScripts', 'foo'], 'Args correct'; is_deeply \%TestHelperClass::p, { '.newfiles' => 1, mech => undef }, 'Params correct'; @@ -64,9 +64,9 @@ use lib "$Bin/../lib"; local @ARGV = 'foo'; local @TestHelperClass::ARGS; local %TestHelperClass::p; - lives_ok { + is exception { TestCreateScript->new_with_options(application_name => 'TestAppToTestScripts', helper_class => 'TestHelperClass::False')->run; - } "with argv"; + }, undef, "with argv"; ok $TestCreateScript::help, 'Did exit with usage into as mk_component returned false'; is_deeply \@TestHelperClass::ARGS, ['TestAppToTestScripts', 'foo'], 'Args correct'; is_deeply \%TestHelperClass::p, { '.newfiles' => 1, mech => undef }, 'Params correct';