Make test skip if Engine::PSGI not installed
Tomas Doran [Sun, 24 Jul 2011 16:42:51 +0000 (17:42 +0100)]
Makefile.PL
t/psgi_file_testapp_engine_plackup_compat.t

index 1d291f7..aa2fdbf 100644 (file)
@@ -79,6 +79,7 @@ else {
 author_requires 'CatalystX::LeakChecker', '0.05';
 author_requires 'File::Copy::Recursive'; # For http server test
 author_requires 'Catalyst::Devel', '1.0'; # For http server test
+author_requires 'Catalyst::Engine::PSGI';
 
 author_tests 't/author';
 author_requires(map {; $_ => 0 } qw(
index ccec7b1..9af4910 100644 (file)
@@ -9,6 +9,9 @@ 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] };