1 use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat';
8 use lib 't/cdbi/testlib';
11 # Test that has_many() will load the foreign class
12 require Class::Inspector;
13 ok !Class::Inspector->loaded( 'Film' );
14 ok eval { Director->has_many( films => 'Film' ); 1; } or diag $@;
16 my $shan_hua = Director->create({
20 my $inframan = Film->create({
22 Director => "Shan Hua",
24 my $guillotine2 = Film->create({
25 Title => "Flying Guillotine 2",
26 Director => "Shan Hua",
28 my $guillotine = Film->create({
29 Title => "Master of the Flying Guillotine",
30 Director => "Yu Wang",
33 is_deeply [sort $shan_hua->films], [sort $inframan, $guillotine2];