convert all uses of Test::Exception to Test::Fatal
[catagits/Catalyst-Runtime.git] / t / psgi_file_testapp_engine_plackup_compat.t
index 9af4910..4f5a2ea 100644 (file)
@@ -4,13 +4,13 @@ use FindBin qw/$Bin/;
 use lib "$Bin/lib";
 
 use Test::More;
-use Test::Exception;
+use Test::Fatal;
 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; };
+    unless eval { local $SIG{__WARN__} = sub{}; require Catalyst::Engine::PSGI; 1; };
 
 my $warning;
 local $SIG{__WARN__} = sub { $warning = $_[0] };
@@ -23,7 +23,7 @@ like $warning, qr/You are running Catalyst\:\:Engine\:\:PSGI/,
 
 test_psgi $app, sub {
     my $cb = shift;
-    lives_ok {
+    is exception {
         my $TIMEOUT_IN_SECONDS = 5;
         local $SIG{ALRM} = sub { die "alarm\n" };
         alarm($TIMEOUT_IN_SECONDS);
@@ -34,7 +34,7 @@ test_psgi $app, sub {
 
         alarm(0);
         1
-    } q{app didn't die or timeout};
+    }, undef, q{app didn't die or timeout};
 };
 
 done_testing;