6 use File::Copy::Recursive;
11 rmtree "$FindBin::Bin/../../t/var" if -d "$FindBin::Bin/../../t/var";
13 # create a TestApp and copy the test libs into it
14 mkdir "$FindBin::Bin/../../t/var";
15 chdir "$FindBin::Bin/../../t/var";
16 system "$FindBin::Bin/../../script/catalyst.pl TestApp";
17 chdir "$FindBin::Bin/../..";
18 File::Copy::Recursive::dircopy( 't/live/lib', 't/var/TestApp/lib' );
20 # spawn the standalone HTTP server
21 my $pid = open SERVER,
22 "$FindBin::Bin/../../t/var/TestApp/script/testapp_server.pl 2>&1 |"
23 or die "Unable to spawn standalone HTTP server: $!";
25 # wait for it to start
28 # run the testsuite against the HTTP server
29 $ENV{CATALYST_SERVER} = 'http://localhost:3000';
30 system( 'prove -r -Ilib/ t/live/' );
37 rmtree "$FindBin::Bin/../../t/var" if -d "$FindBin::Bin/../../t/var";