made cdbi-t optional
[dbsrgits/DBIx-Class.git] / t / cdbi-t / 21-iterator.t
index d029bab..3c84f4c 100644 (file)
@@ -2,14 +2,19 @@ use strict;
 use Test::More;
 
 BEGIN {
-       eval "use DBD::SQLite";
-       plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 33);
+  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 => 33);
 }
 
 use lib 't/testlib';
 use Film;
 
-my $it_class = "DBIx::Class::Cursor";
+my $it_class = "DBIx::Class::ResultSet";
 
 my @film  = (
        Film->create({ Title => 'Film 1' }),