Fixed 'DBIx/Class/DB.pm did not return a true value' error
[dbsrgits/DBIx-Class.git] / t / cdbi-sweet-t / 08pager.t
index ea77d81..71ccaed 100644 (file)
@@ -3,14 +3,20 @@ use warnings;
 
 use Test::More;
 
-eval "use DBD::SQLite";
-plan skip_all => 'needs DBD::SQLite for testing' if $@;
-
-plan tests => 10;
+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 => 10);
+}
 
 use lib 't/lib';
 
-use_ok('DBICTest::HelperRels');
+use_ok('DBICTest');
+DBICTest->init_schema();
 
 DBICTest::CD->load_components(qw/CDBICompat::Pager/);