convert all uses of Test::Exception to Test::Fatal
[catagits/Catalyst-Runtime.git] / t / aggregate / unit_core_script_cgi.t
index f39e377..6a36dbc 100644 (file)
@@ -6,17 +6,19 @@ use FindBin qw/$Bin/;
 use lib "$Bin/../lib";
 
 use Test::More;
-use Test::Exception;
+use Test::Fatal;
 
 use Catalyst::Script::CGI;
 
 local @ARGV;
-lives_ok {
+is exception {
     Catalyst::Script::CGI->new_with_options(application_name => 'TestAppToTestScripts')->run;
-} "new_with_options";
+}, undef, "new_with_options";
 shift @TestAppToTestScripts::RUN_ARGS;
-my $server = shift @TestAppToTestScripts::RUN_ARGS;
-like ref($server), qr/^Plack::Server/, 'Is a Plack Server';
-is_deeply \@TestAppToTestScripts::RUN_ARGS, [], "no args";
+my $server = pop @TestAppToTestScripts::RUN_ARGS;
+like ref($server), qr/^Plack::Handler/, 'Is a Plack::Handler';
+is ref(delete($TestAppToTestScripts::RUN_ARGS[0]->{argv})), 'ARRAY';
+is ref(delete($TestAppToTestScripts::RUN_ARGS[0]->{extra_argv})), 'ARRAY';
+is_deeply \@TestAppToTestScripts::RUN_ARGS, [{}], "no args";
 
 done_testing;