Permalink
Browse files

* Fix double-plan test failures when Test::LeakTrace is not installed.

  • Loading branch information...
1 parent c3d8427 commit 0384151a6729f5f49ee4f365066a789b758ff492 @audreyt audreyt committed Jun 29, 2011
Showing with 9 additions and 5 deletions.
  1. +9 −5 t/55-psgi-leak.t
View
@@ -2,13 +2,17 @@
use warnings;
use strict;
use constant CLIENTS => 10;
-use Test::More tests => 7 + 4*CLIENTS;
+use Test::More;
BEGIN {
- plan skip_all => "Need Test::LeakTrace >= 0.13 to run this test"
- unless eval q{
- require Test::LeakTrace; $Test::LeakTrace::VERSION >= 0.13
- };
+ if (eval q{
+ require Test::LeakTrace; $Test::LeakTrace::VERSION >= 0.13
+ }) {
+ plan tests => 7 + 4*CLIENTS;
+ }
+ else {
+ plan skip_all => "Need Test::LeakTrace >= 0.13 to run this test"
+ }
}
use lib 't'; use Utils;

0 comments on commit 0384151

Please sign in to comment.