5 use File::Temp qw/ tempdir /;
8 use Path::Class qw/ dir /;
11 my @dists = Catalyst::Utils::dist_indicator_file_list();
12 is(scalar(@dists), 4, 'Makefile.PL Build.PL dist.ini cpanfile');
15 foreach my $inc ('', 'lib', 'blib'){
16 my $d = tempdir(CLEANUP => 1);
18 local $INC{'MyApp.pm'} = File::Spec->catfile($d, $inc, 'MyApp.pm');
19 ok !Catalyst::Utils::home('MyApp'), "No files found inc $inc";
20 open(my $fh, '>', "Makefile.PL");
22 is Catalyst::Utils::home('MyApp'), dir($d)->absolute->cleanup, "Did find inc '$inc'";
26 my $d = tempdir(CLEANUP => 1);
27 local $INC{'MyApp.pm'} = File::Spec->catfile($d, 'MyApp.pm');
28 ok !Catalyst::Utils::home('MyApp'), 'No files found';
29 mkdir File::Spec->catdir($d, 'MyApp');
30 is Catalyst::Utils::home('MyApp'), dir($d, 'MyApp')->absolute->cleanup;