Switch CDBICompat and its tests to OptDeps
[dbsrgits/DBIx-Class.git] / t / cdbi / 98-failure.t
index 0f584b1..9a993c4 100644 (file)
@@ -1,20 +1,14 @@
+use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat';
+
 use strict;
+use warnings;
+
 use Test::More;
 
 #----------------------------------------------------------------------
 # Test database failures
 #----------------------------------------------------------------------
 
-BEGIN {
-  eval "use DBIx::Class::CDBICompat;";
-  if ($@) {
-    plan (skip_all => 'Class::Trigger and DBIx::ContextualFetch required');
-    next;
-  }
-  eval "use DBD::SQLite";
-  plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 7);
-}
-
 use lib 't/cdbi/testlib';
 use Film;
 
@@ -60,3 +54,4 @@ if (0) {
   }
 }
 
+done_testing;