CGI-Compile

 view release on metacpan or  search on metacpan

t/psgi.t  view on Meta::CPAN

use Test::More;
use CGI::Compile;
use CGI;
use Test::Requires qw(CGI::Emulate::PSGI Plack::Test HTTP::Request::Common);

use CGI::Emulate::PSGI;
use Plack::Test;
use HTTP::Request::Common;

my $sub = CGI::Compile->compile("t/hello.cgi");
my $app = CGI::Emulate::PSGI->handler($sub);

test_psgi app => $app, client => sub {
    my $cb = shift;

    my $res = $cb->(GET "http://localhost/?name=foo");
    is $res->content, "Hello foo counter=1";



( run in 0.672 second using v1.01-cache-2.11-cpan-de7293f3b23 )