[Jifty-commit] r4813 - in jifty/trunk: lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Thu Jan 10 17:10:42 EST 2008
Author: alexmv
Date: Thu Jan 10 17:10:42 2008
New Revision: 4813
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Test.pm
Log:
r26581 at zoq-fot-pik: chmrr | 2008-01-10 17:10:17 -0500
* Only clobber ::plan if we actually output a plan already
* Require Jifty::Util
Modified: jifty/trunk/lib/Jifty/Test.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Test.pm (original)
+++ jifty/trunk/lib/Jifty/Test.pm Thu Jan 10 17:10:42 2008
@@ -116,20 +116,21 @@
sub import_extra {
my $class = shift;
my $args = shift;
- # Spit out a plan *before* we load modules, in case of compilation
- # errors
+ # Spit out a plan (if we got one) *before* we load modules, in
+ # case of compilation errors
$class->builder->plan(@{$args});
# Require the things we need
require Jifty::YAML;
+ require Jifty::Util;
require Jifty::Server;
require Jifty::Script::Schema;
$class->setup($args);
Test::More->export_to_level(2);
- # Now, clobber Test::Builder::plan so we don't try to spit out the
- # plan *again* later
- {
+ # Now, clobber Test::Builder::plan (if we got given a plan) so we
+ # don't try to spit one out *again* later
+ if ($class->builder->has_plan) {
no warnings 'redefine';
*Test::Builder::plan = sub {};
}
More information about the Jifty-commit
mailing list