I think Test::Exception is a little better here
Andrew Rodland [Fri, 22 Jul 2011 15:00:02 +0000 (11:00 -0400)]
t/psgi_file_testapp_engine_plackup_compat.t

index 54fdabb..ccec7b1 100644 (file)
@@ -4,6 +4,7 @@ use FindBin qw/$Bin/;
 use lib "$Bin/lib";
 
 use Test::More;
+use Test::Exception;
 use Plack::Test;
 use TestApp;
 use HTTP::Request::Common;
@@ -19,7 +20,7 @@ like $warning, qr/You are running Catalyst\:\:Engine\:\:PSGI/,
 
 test_psgi $app, sub {
     my $cb = shift;
-    eval {
+    lives_ok {
         my $TIMEOUT_IN_SECONDS = 5;
         local $SIG{ALRM} = sub { die "alarm\n" };
         alarm($TIMEOUT_IN_SECONDS);
@@ -30,7 +31,7 @@ test_psgi $app, sub {
 
         alarm(0);
         1
-    } || fail "$@ problem";
+    } q{app didn't die or timeout};
 };
 
 done_testing;