From: Peter Rabbitson Date: Wed, 3 Jun 2009 08:14:51 +0000 (+0000) Subject: Require a recent version of Date::Simple during CDBI tests X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=971bc4b63114ba9994a8deeeb5bdc297112fa50b;p=dbsrgits%2FDBIx-Class-Historic.git Require a recent version of Date::Simple during CDBI tests --- diff --git a/Makefile.PL b/Makefile.PL index e0d90c4..d8225bc 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -67,7 +67,7 @@ my %force_requires_if_author = ( 'Class::Trigger' => 0, 'Time::Piece::MySQL' => 0, 'Clone' => 0, - 'Date::Simple' => 0, + 'Date::Simple' => 3.03, # t/52cycle.t 'Test::Memory::Cycle' => 0, diff --git a/t/cdbi/04-lazy.t b/t/cdbi/04-lazy.t index 4c6e178..35a1219 100644 --- a/t/cdbi/04-lazy.t +++ b/t/cdbi/04-lazy.t @@ -10,12 +10,10 @@ use Test::Warn; BEGIN { eval "use DBIx::Class::CDBICompat;"; - if ($@) { - plan (skip_all => 'Class::Trigger and DBIx::ContextualFetch required'); - next; - } - eval "use DBD::SQLite"; - plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 36); + plan $@ + ? (skip_all => 'Class::Trigger and DBIx::ContextualFetch required') + : (tests => 36) + ; } INIT { @@ -120,7 +118,7 @@ warning_like { # Now again for inflated values SKIP: { - skip "Requires Date::Simple", 5 unless eval "use Date::Simple; 1; "; + skip "Requires Date::Simple 3.03", 5 unless eval "use Date::Simple 3.03; 1; "; Lazy->has_a( orp => 'Date::Simple', inflate => sub { Date::Simple->new($_[0] . '-01-01') }, diff --git a/t/cdbi/testlib/MyFoo.pm b/t/cdbi/testlib/MyFoo.pm index dd387e2..4fbc989 100644 --- a/t/cdbi/testlib/MyFoo.pm +++ b/t/cdbi/testlib/MyFoo.pm @@ -3,6 +3,8 @@ package # hide from PAUSE use base 'MyBase'; +use Date::Simple 3.03; + use strict; __PACKAGE__->set_table();