Add strict/warnings test, adjust all offenders (wow, that was a lot)
[dbsrgits/DBIx-Class.git] / t / cdbi / set_to_undef.t
index 83cf1a2..03fe0ca 100644 (file)
@@ -1,12 +1,13 @@
 use strict;
+use warnings;
 use Test::More;
 
+use lib 't/cdbi/testlib';
+use DBIC::Test::SQLite (); # this will issue the necessary SKIPs on missing reqs
+
 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;
+  eval { require DateTime; DateTime->VERSION(0.55) }
+    or plan skip_all => 'DateTime 0.55 required for this test';
 }
 
 
@@ -19,7 +20,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 +31,5 @@ is $thing->get( "this" ), undef, 'undef set';
 $thing->discard_changes;
 
 is @warnings, 0, 'no warnings';
+
+done_testing;