9 eval "use File::Copy::Recursive";
11 plan skip_all => 'File::Copy::Recursive required' if $@;
12 plan skip_all => 'set TEST_HTTP to enable this test' unless $ENV{TEST_HTTP};
15 rmtree "$FindBin::Bin/../../t/var" if -d "$FindBin::Bin/../../t/var";
17 # create a TestApp and copy the test libs into it
18 mkdir "$FindBin::Bin/../../t/var";
19 chdir "$FindBin::Bin/../../t/var";
20 system "$FindBin::Bin/../../script/catalyst.pl TestApp";
21 chdir "$FindBin::Bin/../..";
22 File::Copy::Recursive::dircopy( 't/live/lib', 't/var/TestApp/lib' );
24 # spawn the standalone HTTP server
25 my $pid = open SERVER,
26 "$FindBin::Bin/../../t/var/TestApp/script/testapp_server.pl 2>&1 |"
27 or die "Unable to spawn standalone HTTP server: $!";
29 # wait for it to start
32 # run the testsuite against the HTTP server
33 $ENV{CATALYST_SERVER} = 'http://localhost:3000';
34 system( 'prove -r -Ilib/ t/live/' );
41 rmtree "$FindBin::Bin/../../t/var" if -d "$FindBin::Bin/../../t/var";