The nginx bullshit can just die
[catagits/Catalyst-Runtime.git] / t / psgi_file_testapp_engine_plackup_compat.t
index 54fdabb..9af4910 100644 (file)
@@ -4,10 +4,14 @@ use FindBin qw/$Bin/;
 use lib "$Bin/lib";
 
 use Test::More;
+use Test::Exception;
 use Plack::Test;
 use TestApp;
 use HTTP::Request::Common;
 
+plan skip_all => "Catalyst::Engine::PSGI required for this test"
+    unless eval { require Catalyst::Engine::PSGI; 1; };
+
 my $warning;
 local $SIG{__WARN__} = sub { $warning = $_[0] };
 
@@ -19,7 +23,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 +34,7 @@ test_psgi $app, sub {
 
         alarm(0);
         1
-    } || fail "$@ problem";
+    } q{app didn't die or timeout};
 };
 
 done_testing;