Switch CDBICompat and its tests to OptDeps
[dbsrgits/DBIx-Class.git] / t / cdbi / 01-columns.t
index e0c362b..76bce52 100644 (file)
@@ -1,13 +1,11 @@
+use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat';
+
 use strict;
+use warnings;
 
 use Test::More;
 use lib 't/cdbi/testlib';
 
-BEGIN {
-  eval "use DBIx::Class::CDBICompat;";
-  plan $@ ? (skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@") : (tests=> 24);
-}
-
 
 #-----------------------------------------------------------------------
 # Make sure that we can set up columns properly
@@ -101,8 +99,8 @@ ok(!State->find_column('HGLAGAGlAG'), '!find_column HGLAGAGlAG');
 }
 
 {
-  SKIP: {
-    skip "No column objects", 1;
+  {
+    local $TODO = "No column objects";
 
     eval { my @grps = State->__grouper->groups_for("Huh"); };
     ok $@, "Huh not in groups";
@@ -152,3 +150,4 @@ is join (' ', sort A->columns),    'id',          "A columns";
 is join (' ', sort A::B->columns), 'b1 id',       "A::B columns";
 is join (' ', sort A::C->columns), 'c1 c2 c3 id', "A::C columns";
 
+done_testing;