Add NoObjectIndex which turns the live object index off and removes all the
[dbsrgits/DBIx-Class.git] / t / cdbi-t / object_cache.t
index e194a31..295bde6 100644 (file)
@@ -6,10 +6,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 => 5);
+  plan skip_all => 'needs DBD::SQLite for testing' if $@;
 }
 
 INIT {
@@ -17,6 +17,12 @@ INIT {
     use Film;
 }
 
+plan skip_all => "Object cache is turned off"
+    if Film->isa("DBIx::Class::CDBICompat::NoObjectIndex");
+
+plan tests => 5;
+
+
 ok +Film->create({
     Title       => 'This Is Spinal Tap',
     Director    => 'Rob Reiner',