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=2dde9d9b90b3fc360222907c61c879554db9b1db;hpb=665a72a25c7bc0d928ea0924f3023d3e14c302d1;p=catagits%2FCatalyst-Runtime.git diff --git a/t/aggregate/unit_core_script_fastcgi.t b/t/aggregate/unit_core_script_fastcgi.t index 2dde9d9..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,13 +34,20 @@ 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) && 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'; + } + is_deeply \@TestAppToTestScripts::RUN_ARGS, $resultarray, "is_deeply comparison"; }