Remove redundant skip checks in CDBICompat tests
[dbsrgits/DBIx-Class.git] / t / cdbi / 02-Film.t
index 5ef43bb..111a4f0 100644 (file)
@@ -1,21 +1,13 @@
 use strict;
+use warnings;
+
 use Test::More;
 use Scalar::Util 'refaddr';
 use namespace::clean;
 $| = 1;
 
-BEGIN {
-  eval "use DBIx::Class::CDBICompat;";
-  if ($@) {
-    plan (skip_all => 'Class::Trigger and DBIx::ContextualFetch required');
-  }
-  plan tests => 98;
-}
-
-INIT {
-  use lib 't/cdbi/testlib';
-  use Film;
-}
+use lib 't/cdbi/testlib';
+use Film;
 
 ok(Film->can('db_Main'), 'set_db()');
 is(Film->__driver, "SQLite", "Driver set correctly");
@@ -38,7 +30,7 @@ is(Film->__driver, "SQLite", "Driver set correctly");
 }
 
 eval { my $duh = Film->insert; };
-like $@, qr/create needs a hashref/, "needs a hashref";
+like $@, qr/Result object instantiation requires a hashref as argument/, "needs a hashref";
 
 ok +Film->create_test_film;
 
@@ -377,9 +369,7 @@ if (0) {
   ok !$film, "It destroys itself";
 }
 
-SKIP: {
-    skip "Caching has been removed", 5
-        if Film->isa("DBIx::Class::CDBICompat::NoObjectIndex");
+{
 
   # my bad taste is your bad taste
   my $btaste  = Film->retrieve('Bad Taste');
@@ -412,3 +402,5 @@ SKIP: {
     "Creating and retrieving gives ref to same object";
 
 }
+
+done_testing;