[Jifty-commit] r7610 - jifty/trunk/lib/Jifty

Jifty commits jifty-commit at lists.jifty.org
Thu Nov 12 09:57:03 EST 2009


Author: sartak
Date: Thu Nov 12 09:57:03 2009
New Revision: 7610

Modified:
   jifty/trunk/lib/Jifty/Test.pm

Log:
Handle use Jifty::Test 'no_plan' more gracefully than exploding

Modified: jifty/trunk/lib/Jifty/Test.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Test.pm	(original)
+++ jifty/trunk/lib/Jifty/Test.pm	Thu Nov 12 09:57:03 2009
@@ -138,8 +138,11 @@
     # the modified $args is then passed to Test::Builder's plan.  we should 
     # strip our custom items.
     # XXX: this should probably be done in _strip_imports
-    my %args = @$args;
-    @$args = map { $args{$_} ? ($_ => $args{$_ }) : () } qw(tests skip_all);
+    # we check for multiple args because of 'no_plan'
+    if (@$args > 1) {
+        my %args = @$args;
+        @$args = map { $args{$_} ? ($_ => $args{$_ }) : () } qw(tests skip_all);
+    }
 }
 
 =head2 setup ARGS


More information about the Jifty-commit mailing list