X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Fpsgi_file_testapp_engine_plackup_compat.t;h=3578c6c7a44cae1d9ae400300419ee25b3572c7a;hp=54fdabbdcd818a0bd9fe9cf695f79d02b08a05b4;hb=11d52bbdb4fccbe1678d869494acb9d43ae83c99;hpb=da054c21560085fcd1f96f7b33b388749544e9f6 diff --git a/t/psgi_file_testapp_engine_plackup_compat.t b/t/psgi_file_testapp_engine_plackup_compat.t index 54fdabb..3578c6c 100644 --- a/t/psgi_file_testapp_engine_plackup_compat.t +++ b/t/psgi_file_testapp_engine_plackup_compat.t @@ -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 { local $SIG{__WARN__} = sub{}; 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;