Subject: | [PATCH] t/27-client-leaks.t fails without recommended module DateTime |
If DateTime is not installed, t/27-client-leaks.t fails. This
contradicts the idea that DateTime is only "recommended". The following
patch fixes the test to skip it if DateTime is not installed.
--- t/27-client-leaks.t.old 2007-02-04 15:52:44.000000000 -0600
+++ t/27-client-leaks.t 2007-02-04 15:53:48.000000000 -0600
@@ -1,7 +1,16 @@
use strict;
use warnings;
+use Test::More;
+
+BEGIN {
+ unless (eval { require DateTime; }) {
+ plan skip_all => 'DateTime is required for tests';
+ } else {
+ plan tests => 1;
+ }
+}
+
use XML::Atom::Client;
-use Test::More tests => 1;
my $foo;
no warnings 'redefine';