[Jifty-commit] r2307 - in jifty/trunk: t

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sun Dec 3 20:48:03 EST 2006


Author: agentz
Date: Sun Dec  3 20:47:55 2006
New Revision: 2307

Modified:
   jifty/trunk/Makefile.PL
   jifty/trunk/t/06-forms.t

Log:
- made Test::MockModule and Test::MockObject optional by
  putting them into development dependency list
- adjusted t/06-forms.t to skip related tests when
  these two modules are not installed.

Modified: jifty/trunk/Makefile.PL
==============================================================================
--- jifty/trunk/Makefile.PL	(original)
+++ jifty/trunk/Makefile.PL	Sun Dec  3 20:47:55 2006
@@ -58,8 +58,6 @@
 requires('String::Koremutake');
 requires('SQL::ReservedWords');
 requires('Test::Base');
-requires('Test::MockModule' => '0.05');
-requires('Test::MockObject' => '1.07');
 requires('UNIVERSAL::require');
 requires('URI');
 requires('XML::Writer' => '0.601');
@@ -90,6 +88,8 @@
         recommends('Test::HTTP::Server::Simple' => '0.02' ),
         recommends('Test::HTML::Lint'),
         recommends('Test::More' => 0.62 ),
+        recommends('Test::MockModule' => '0.05'),
+        recommends('Test::MockObject' => '1.07'),
         recommends('Test::Pod::Coverage'),
         recommends('Test::WWW::Mechanize' => 1.04 ),
         recommends('WWW::Mechanize' => 1.12 ),

Modified: jifty/trunk/t/06-forms.t
==============================================================================
--- jifty/trunk/t/06-forms.t	(original)
+++ jifty/trunk/t/06-forms.t	Sun Dec  3 20:47:55 2006
@@ -1,8 +1,6 @@
 use warnings;
 use strict;
 use Jifty::Test tests => 24;
-use Test::MockObject;
-use Test::MockModule;
 
 use_ok ('Jifty::Web::Form::Field');
 
@@ -24,7 +22,14 @@
 is ($field->type, 'text', "type defaults to text");
 
 # Test render_XXX methods:
-{
+SKIP: {
+    eval {
+        require Test::MockObject;
+        require Test::MockModule;
+    };
+    skip "Test::MockObject or Test::MockModule required",
+        13 if $@;
+
     my $out; # buf to store mason outputs
 
     # mock up an instance of Jifty::Result


More information about the Jifty-commit mailing list