[Jifty-commit] r5288 - in jifty/trunk: t/TestApp-Plugin-Comments/t

Jifty commits jifty-commit at lists.jifty.org
Tue Apr 8 17:01:58 EDT 2008


Author: sartak
Date: Tue Apr  8 17:01:58 2008
New Revision: 5288

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/t/TestApp-Plugin-Comments/t/00-model-BlogPost.t

Log:
 r53810 at onn:  sartak | 2008-04-08 17:01:32 -0400
 Move the dependency check for the Comments plugin to before we load any of Jifty


Modified: jifty/trunk/t/TestApp-Plugin-Comments/t/00-model-BlogPost.t
==============================================================================
--- jifty/trunk/t/TestApp-Plugin-Comments/t/00-model-BlogPost.t	(original)
+++ jifty/trunk/t/TestApp-Plugin-Comments/t/00-model-BlogPost.t	Tue Apr  8 17:01:58 2008
@@ -8,19 +8,21 @@
 
 =cut
 
+use Test::More;
+BEGIN {
+    if (eval { require HTML::Scrubber; require MIME::Base64::URLSafe; require Regexp::Common::Email::Address; 1 }) {
+        plan tests => 16;
+    }
+    else {
+        plan skip_all => 'A requirement of the Comment plugin is not installed.';
+    }
+}
+
 use lib 't/lib';
 use Jifty::SubTest;
 
 use Jifty::Test;
 
-eval "use HTML::Scrubber; use MIME::Base64::URLSafe; use Regexp::Common::Email::Address; 1";
-if ($@) {
-    plan skip_all => 'A requirement of the Comment plugin is not installed.';
-}
-else {
-    plan tests => 16;
-}
-
 # Make sure we can load the model
 use_ok('TestApp::Plugin::Comments::Model::BlogPost');
 


More information about the Jifty-commit mailing list