Institute a central "load this first in testing" package
[dbsrgits/DBIx-Class.git] / t / cdbi / set_to_undef.t
index 83cf1a2..149be2c 100644 (file)
@@ -1,14 +1,11 @@
-use strict;
-use Test::More;
+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
+use DBIx::Class::Optional::Dependencies -skip_all_without => qw( ic_dt cdbicompat );
 
-BEGIN {
-  eval "use DBIx::Class::CDBICompat;";
-  plan skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@"
-    if $@;
-  plan skip_all => "DateTime required" unless eval { require DateTime };
-  plan tests => 2;
-}
+use strict;
+use warnings;
 
+use Test::More;
+use lib 't/cdbi/testlib';
 
 # Don't use Test::NoWarnings because of an unrelated DBD::SQLite warning.
 my @warnings;
@@ -19,7 +16,7 @@ local $SIG{__WARN__} = sub {
 {
     package Thing;
 
-    use base 'DBIx::Class::Test::SQLite';
+    use base 'DBIC::Test::SQLite';
 
     Thing->columns(All  => qw[thing_id this that date]);
 }
@@ -30,3 +27,5 @@ is $thing->get( "this" ), undef, 'undef set';
 $thing->discard_changes;
 
 is @warnings, 0, 'no warnings';
+
+done_testing;