X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Faggregate%2Funit_core_script_fastcgi.t;h=5a2c4984c6acc576d0b0835a076c3a9fcd0ae644;hb=dd4530ecdc4684838d9c0e9dc00adebb6100b022;hp=93f1c16aa0cc31441ffb19bd4a2aac7a90e8d3f0;hpb=aee7cdcc0b2b3b7dc672b4b4a31b8c3b7ef3f1f7;p=catagits%2FCatalyst-Runtime.git diff --git a/t/aggregate/unit_core_script_fastcgi.t b/t/aggregate/unit_core_script_fastcgi.t index 93f1c16..5a2c498 100644 --- a/t/aggregate/unit_core_script_fastcgi.t +++ b/t/aggregate/unit_core_script_fastcgi.t @@ -5,7 +5,9 @@ use FindBin qw/$Bin/; use lib "$Bin/../lib"; use Test::More; -use Test::Exception; +use Test::Fatal; + +use Ref::Util qw(is_plain_hashref); use Catalyst::Script::FastCGI; @@ -32,16 +34,16 @@ sub testOption { local @ARGV = @$argstring; local @TestAppToTestScripts::RUN_ARGS; - lives_ok { + is exception { TestFastCGIScript->new_with_options(application_name => 'TestAppToTestScripts')->run; - } "new_with_options"; + }, undef, "new_with_options"; # First element of RUN_ARGS will be the script name, which we don't care about shift @TestAppToTestScripts::RUN_ARGS; my $server = pop @TestAppToTestScripts::RUN_ARGS; is $server, $fake_handler, 'Loaded Plack handler gets passed to the app'; - if (scalar(@TestAppToTestScripts::RUN_ARGS) && ref($TestAppToTestScripts::RUN_ARGS[-1]) eq "HASH") { + if (scalar(@TestAppToTestScripts::RUN_ARGS) && is_plain_hashref($TestAppToTestScripts::RUN_ARGS[-1])) { is ref(delete($TestAppToTestScripts::RUN_ARGS[-1]->{argv})), 'ARRAY'; is ref(delete($TestAppToTestScripts::RUN_ARGS[-1]->{extra_argv})), 'ARRAY'; }