Switch CDBICompat and its tests to OptDeps
[dbsrgits/DBIx-Class.git] / t / cdbi / hasa_without_loading.t
index 073ef3e..3b92c4d 100644 (file)
@@ -1,11 +1,11 @@
+use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat';
+
 use strict;
+use warnings;
+
 use Test::More;
 
-BEGIN {
-  eval "use DBIx::Class::CDBICompat;";
-  plan $@ ? (skip_all => 'Class::Trigger and DBIx::ContextualFetch required')
-          : (tests=> 2);
-}
+use lib 't/cdbi/testlib';
 
 package Foo;
 
@@ -19,3 +19,5 @@ eval {
 #::is $@, '';
 ::is(Foo->table, "foo");
 ::is_deeply [sort map lc, Foo->columns], [sort map lc, qw(foo bar)];
+
+::done_testing;