X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcdbi%2F09-has_many.t;h=c0636572807cf6a95392843ddfe02437e4d0e3ce;hb=50841788d03e2342a00470eb2f458e717922615b;hp=96b50c08f7cca4bf077b95dc3ed38ef6c20144b0;hpb=6a3bf2519832866d037740c5fb22341dad6f8bb3;p=dbsrgits%2FDBIx-Class.git diff --git a/t/cdbi/09-has_many.t b/t/cdbi/09-has_many.t index 96b50c0..c063657 100644 --- a/t/cdbi/09-has_many.t +++ b/t/cdbi/09-has_many.t @@ -1,14 +1,10 @@ -use strict; -use Test::More; +BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } +use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat'; +use strict; +use warnings; -BEGIN { - eval "use DBIx::Class::CDBICompat;"; - plan skip_all => 'Class::Trigger and DBIx::ContextualFetch required' if $@; - eval "use DBD::SQLite"; - plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 31); -} - +use Test::More; use lib 't/cdbi/testlib'; use Film; @@ -54,7 +50,7 @@ eval { my $pj = Film->add_to_actors(\%pj_data) }; like $@, qr/class/, "add_to_actors must be object method"; eval { my $pj = $btaste->add_to_actors(%pj_data) }; -like $@, qr/needs/, "add_to_actors takes hash"; +like $@, qr/Result object instantiation requires a single hashref argument/, "add_to_actors takes hash"; ok( my $pj = $btaste->add_to_actors( @@ -125,3 +121,5 @@ is($as->Name, 'Arnold Schwarzenegger', "Arnie's still Arnie"); is_deeply [sort map { $_->id } $other_thing->things], [1,2]; } + +done_testing;