4 use Class::Inspector ();
7 use lib 't/cdbi/testlib';
10 # Test that has_many() will load the foreign class.
11 ok !Class::Inspector->loaded( 'Film' );
12 ok eval { Director->has_many( films => 'Film' ); 1; } || diag $@;
14 my $shan_hua = Director->create({
18 my $inframan = Film->create({
20 Director => "Shan Hua",
22 my $guillotine2 = Film->create({
23 Title => "Flying Guillotine 2",
24 Director => "Shan Hua",
26 my $guillotine = Film->create({
27 Title => "Master of the Flying Guillotine",
28 Director => "Yu Wang",
31 is_deeply [sort $shan_hua->films], [sort $inframan, $guillotine2];