Remove use of overload
[catagits/Catalyst-Runtime.git] / t / optional_http-server.t
index 5516b66..fbef97f 100644 (file)
@@ -11,9 +11,12 @@ use Test::More;
 plan skip_all => 'set TEST_HTTP to enable this test' unless $ENV{TEST_HTTP};
 eval "use Catalyst::Devel 1.0";
 plan skip_all => 'Catalyst::Devel required' if $@;
+eval "use File::Copy::Recursive";
+plan skip_all => 'File::Copy::Recursive required' if $@;
 plan tests => 1;
 
-use File::Copy::Recursive;
+# Run a single test by providing it as the first arg
+my $single_test = shift;
 
 # clean up
 rmtree "$FindBin::Bin/../t/tmp" if -d "$FindBin::Bin/../t/tmp";
@@ -42,7 +45,13 @@ while ( check_port( 'localhost', $port ) != 1 ) {
 
 # run the testsuite against the HTTP server
 $ENV{CATALYST_SERVER} = "http://localhost:$port";
-system( 'prove -r -Ilib/ t/live_*' );
+
+if ( $single_test ) {
+    system( "perl -Ilib/ $single_test" );
+}
+else {
+    system( 'prove -r -Ilib/ t/live_*' );
+}
 
 # shut it down
 kill 'INT', $pid;