X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Faggregate%2Funit_utils_home.t;h=139e021982bde7eaa0d06cc1b930cebfb41b0c04;hp=587f618331d306256f2fc5675aea9e9cca69581a;hb=7064f69b1dfb59d1f3bad647b2097d0320acce8a;hpb=15c40696c8e1e840553573af61037032cc16768d diff --git a/t/aggregate/unit_utils_home.t b/t/aggregate/unit_utils_home.t index 587f618..139e021 100644 --- a/t/aggregate/unit_utils_home.t +++ b/t/aggregate/unit_utils_home.t @@ -9,13 +9,13 @@ use Path::Class qw/ dir /; use Cwd qw/ cwd /; my @dists = Catalyst::Utils::dist_indicator_file_list(); -is(scalar(@dists), 3, 'Makefile.PL Build.PL dist.ini'); +is(scalar(@dists), 4, 'Makefile.PL Build.PL dist.ini cpanfile'); my $cwd = cwd(); foreach my $inc ('', 'lib', 'blib'){ my $d = tempdir(CLEANUP => 1); chdir($d); - local $INC{'MyApp.pm'} = File::Spec->catdir($d, $inc, 'MyApp.pm'); + local $INC{'MyApp.pm'} = File::Spec->catfile($d, $inc, 'MyApp.pm'); ok !Catalyst::Utils::home('MyApp'), "No files found inc $inc"; open(my $fh, '>', "Makefile.PL"); close($fh); @@ -24,21 +24,12 @@ foreach my $inc ('', 'lib', 'blib'){ { my $d = tempdir(CLEANUP => 1); - local $INC{'MyApp.pm'} = File::Spec->catdir($d, 'MyApp.pm'); + local $INC{'MyApp.pm'} = File::Spec->catfile($d, 'MyApp.pm'); ok !Catalyst::Utils::home('MyApp'), 'No files found'; mkdir File::Spec->catdir($d, 'MyApp'); is Catalyst::Utils::home('MyApp'), dir($d, 'MyApp')->absolute->cleanup; } -{ - my $d = tempdir(CLEANUP => 1); - chdir($d); - ok !Catalyst::Utils::find_home_unloaded_in_checkout(); - open(my $fh, '>', "Makefile.PL"); - close($fh); - is Catalyst::Utils::find_home_unloaded_in_checkout(), cwd(), "Did find home_unloaded_in_checkout" -} - chdir($cwd); done_testing;