Don't break the calling convention for the run method by making the server the last...
[catagits/Catalyst-Runtime.git] / t / aggregate / unit_core_script_cgi.t
1 #!/usr/bin/env perl
2 use strict;
3 use warnings;
4
5 use FindBin qw/$Bin/;
6 use lib "$Bin/../lib";
7
8 use Test::More;
9 use Test::Exception;
10
11 use Catalyst::Script::CGI;
12
13 local @ARGV;
14 lives_ok {
15     Catalyst::Script::CGI->new_with_options(application_name => 'TestAppToTestScripts')->run;
16 } "new_with_options";
17 shift @TestAppToTestScripts::RUN_ARGS;
18 my $server = shift @TestAppToTestScripts::RUN_ARGS;
19 like ref($server), qr/^Plack::Server/, 'Is a Plack Server';
20 is_deeply \@TestAppToTestScripts::RUN_ARGS, [], "no args";
21
22 done_testing;