Institute a central "load this first in testing" package
[dbsrgits/DBIx-Class.git] / t / cdbi / 22-deflate_order.t
index 3d53245..a54eaf7 100644 (file)
@@ -1,23 +1,14 @@
+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
+use DBIx::Class::Optional::Dependencies -skip_all_without => qw( cdbicompat test_rdbms_mysql Time::Piece::MySQL>=0 );
+
 $| = 1;
+use warnings;
 use strict;
 
 use Test::More;
 
-eval "use DBIx::Class::CDBICompat;";
-if ($@) {
-    plan (skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@");
-    next;
-}
-
-plan skip_all => 'Set $ENV{DBICTEST_MYSQL_DSN}, _USER and _PASS to run this test'
-  unless ($ENV{DBICTEST_MYSQL_DSN} && $ENV{DBICTEST_MYSQL_USER});
-
-eval { require Time::Piece::MySQL };
-plan skip_all => "Need Time::Piece::MySQL for this test" if $@;
-
-plan tests => 3;
-
 use lib 't/cdbi/testlib';
+
 use_ok ('Log');
 
 package main;
@@ -31,3 +22,4 @@ $log->update;
 ok eval { $log->datetime_stamp }, "Have datetime after update";
 diag $@ if $@;
 
+done_testing;