Merge the relationship resolution rework
[dbsrgits/DBIx-Class.git] / t / cdbi / 09-has_many.t
index b9048dc..c063657 100644 (file)
@@ -1,13 +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 $@;
-  plan tests => 31;
-}
-
+use Test::More;
 
 use lib 't/cdbi/testlib';
 use Film;
@@ -53,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(
@@ -124,3 +121,5 @@ is($as->Name, 'Arnold Schwarzenegger', "Arnie's still Arnie");
 
     is_deeply [sort map { $_->id } $other_thing->things], [1,2];
 }
+
+done_testing;