about summary refs log tree commit homepage
path: root/t/plack.t
diff options
context:
space:
mode:
authore@80x24.org <e@80x24.org>2015-12-26 23:38:17 +0000
committerEric Wong <e@80x24.org>2015-12-26 23:46:08 +0000
commit83fedde4cde6539386c9d3ecf37fb99d74af8d93 (patch)
tree4b46738aba5f197916358879285ee5fa3affde4e /t/plack.t
parent938cf615b743c62f5359285c2fd7da7b9f0ba6b0 (diff)
downloadpublic-inbox-83fedde4cde6539386c9d3ecf37fb99d74af8d93.tar.gz
We should be able to run tests on bare bones systems more easily.
Diffstat (limited to 't/plack.t')
-rw-r--r--t/plack.t15
1 files changed, 7 insertions, 8 deletions
diff --git a/t/plack.t b/t/plack.t
index 31ec58da..6c7edb5d 100644
--- a/t/plack.t
+++ b/t/plack.t
@@ -21,14 +21,13 @@ my $cfgpfx = "publicinbox.test";
 my $failbox = "$home/fail.mbox";
 local $ENV{PI_EMERGENCY} = $failbox;
 
-our $have_plack;
-eval {
-        require Plack::Request;
-        eval 'use Plack::Test; use HTTP::Request::Common';
-        $have_plack = 1;
-};
-SKIP: {
-        skip 'Plack not installed', 1 unless $have_plack;
+foreach my $mod (qw(Plack::Test HTTP::Request::Common
+                         Mail::Thread URI::Escape)) {
+        eval "require $mod";
+        plan skip_all => "$mod missing for plack.t" if $@;
+}
+
+{
         ok(-f $psgi, "psgi example file found");
         ok(-x "$main_bin/spamc",
                 "spamc ham mock found (run in top of source tree");