+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
+use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat';
+
use strict;
+use warnings;
+
use Test::More;
use Scalar::Util 'refaddr';
use namespace::clean;
$| = 1;
-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");
}
eval { my $duh = Film->insert; };
-like $@, qr/create needs a hashref/, "needs a hashref";
+like $@, qr/Result object instantiation requires a single hashref argument/, "needs a hashref";
ok +Film->create_test_film;
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');