6 eval "use DBIx::Class::CDBICompat;";
7 plan skip_all => 'Class::Trigger and DBIx::ContextualFetch required' if $@;
12 use lib 't/cdbi/testlib';
15 # Test that has_many() will load the foreign class.
16 ok !Class::Inspector->loaded( 'Film' );
17 ok eval { Director->has_many( films => 'Film' ); 1; } || diag $@;
19 my $shan_hua = Director->create({
23 my $inframan = Film->create({
25 Director => "Shan Hua",
27 my $guillotine2 = Film->create({
28 Title => "Flying Guillotine 2",
29 Director => "Shan Hua",
31 my $guillotine = Film->create({
32 Title => "Master of the Flying Guillotine",
33 Director => "Yu Wang",
36 is_deeply [sort $shan_hua->films], [sort $inframan, $guillotine2];