X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Faggregate%2Funit_core_path_to.t;fp=t%2Faggregate%2Funit_core_path_to.t;h=f4fe89f5ff662bb1a89bd8d12f2cb21f746d813c;hb=0891873bd40ef6164f42674000fb663f0d223f68;hp=a89135c578fca0b2e1c46f9645488e3dbf3ee87a;hpb=b1cb1951d47533ecf9ccd52aaac1d02f051cf205;p=catagits%2FCatalyst-Runtime.git diff --git a/t/aggregate/unit_core_path_to.t b/t/aggregate/unit_core_path_to.t index a89135c..f4fe89f 100644 --- a/t/aggregate/unit_core_path_to.t +++ b/t/aggregate/unit_core_path_to.t @@ -2,6 +2,9 @@ use strict; use warnings; use Test::More; +use FindBin; +use Path::Class; +use File::Basename; my %non_unix = ( MacOS => 1, @@ -16,17 +19,20 @@ my %non_unix = ( my $os = $non_unix{$^O} ? $^O : 'Unix'; -if( $os ne 'Unix' ) { +if ( $os ne 'Unix' ) { plan skip_all => 'tests require Unix'; } -else { - plan tests => 3; -} use_ok('Catalyst'); my $context = 'Catalyst'; +$context->setup_home; +my $base = dir($FindBin::Bin)->relative->stringify; + +isa_ok( Catalyst::path_to( $context, $base ), 'Path::Class::Dir' ); +isa_ok( Catalyst::path_to( $context, $base, basename $0 ), 'Path::Class::File' ); + my $config = Catalyst->config; $config->{home} = '/home/sri/my-app/'; @@ -37,3 +43,5 @@ $config->{home} = '/Users/sri/myapp/'; is( Catalyst::path_to( $context, 'foo', 'bar' ), '/Users/sri/myapp/foo/bar', 'deep Unix path' ); + +done_testing;