From: Peter Rabbitson Date: Fri, 31 Oct 2008 20:34:27 +0000 (+0000) Subject: 68inflate_has_a.t tests the cdbi-compat shim and thus belongs in t/cdbi-t X-Git-Tag: v0.08240~280 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f4086911882bd523b07597f2f001a2786aee2dd0;p=dbsrgits%2FDBIx-Class.git 68inflate_has_a.t tests the cdbi-compat shim and thus belongs in t/cdbi-t bumped up the version of DBD::SQLite required for testing --- diff --git a/Makefile.PL b/Makefile.PL index 2fdc3ce..a5bd70a 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -29,7 +29,7 @@ requires 'Sub::Name' => 0.04; # Perl 5.8.0 doesn't have utf8::is_utf8() requires 'Encode' => 0 if ($] <= 5.008000); -test_requires 'DBD::SQLite' => 1.13; +test_requires 'DBD::SQLite' => 1.14; test_requires 'Test::Builder' => 0.33; test_requires 'Test::Warn' => 0.11; test_requires 'Test::Exception' => 0; diff --git a/t/68inflate_has_a.t b/t/cdbi-t/68-inflate_has_a.t similarity index 78% rename from t/68inflate_has_a.t rename to t/cdbi-t/68-inflate_has_a.t index 9dc1661..0019e29 100644 --- a/t/68inflate_has_a.t +++ b/t/cdbi-t/68-inflate_has_a.t @@ -1,20 +1,26 @@ use strict; -use warnings; - +use warnings; use Test::More; -use lib qw(t/lib); -use DBICTest; -my $schema = DBICTest->init_schema(); +BEGIN { + eval "use DBIx::Class::CDBICompat;"; + plan skip_all => "Class::Trigger and DBIx::ContextualFetch required" + if $@; -eval { require DateTime }; -plan skip_all => "Need DateTime for inflation tests" if $@; + eval { require DateTime }; + plan skip_all => "Need DateTime for inflation tests" if $@; -eval { require Clone }; -plan skip_all => "Need Clone for CDBICompat inflation tests" if $@; + eval { require Clone }; + plan skip_all => "Need Clone for CDBICompat inflation tests" if $@; +} plan tests => 6; +use lib qw(t/lib); +use DBICTest; + +my $schema = DBICTest->init_schema(); + DBICTest::Schema::CD->load_components(qw/CDBICompat::Relationships/); DBICTest::Schema::CD->has_a( 'year', 'DateTime',