X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcdbi-t%2F18-has_a.t;h=ca7786ef863599d60eb699b03adf42f7f2ea0ba5;hb=c79bd6e9b40607d08e41879ecad0804c38bf14dc;hp=84ee2920c2809ea661125dabd452dba5acdb9cbc;hpb=9bc6db133eae500322e0e3670d5509d27d208f9e;p=dbsrgits%2FDBIx-Class.git diff --git a/t/cdbi-t/18-has_a.t b/t/cdbi-t/18-has_a.t index 84ee292..ca7786e 100644 --- a/t/cdbi-t/18-has_a.t +++ b/t/cdbi-t/18-has_a.t @@ -2,8 +2,13 @@ use strict; use Test::More; BEGIN { - eval "use DBD::SQLite"; - plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 41); + 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 => 41); } use lib 't/testlib'; @@ -33,7 +38,7 @@ ok( ok $pj = $btaste->Director, "Bad taste now hasa() director"; isa_ok $pj => 'Director'; { - no warnings 'redefine'; + no warnings qw(redefine once); local *Ima::DBI::st::execute = sub { ::fail("Shouldn't need to query db"); }; is $pj->id, 'Peter Jackson', 'ID already stored'; @@ -140,7 +145,7 @@ SKIP: { YA::Film->add_relationship_type(has_a => "YA::HasA"); package YA::HasA; - use base 'Class::DBI::Relationship::HasA'; + #use base 'Class::DBI::Relationship::HasA'; sub _inflator { my $self = shift;