20 my $os = $non_unix{$^O} ? $^O : 'Unix';
22 if ( $os ne 'Unix' ) {
23 plan skip_all => 'tests require Unix';
28 my $context = 'Catalyst';
30 delete $ENV{CATALYST_HOME}; # otherwise it'll set itself up to the wrong place
33 my $base = dir($FindBin::Bin)->relative->stringify;
35 isa_ok( Catalyst::path_to( $context, $base ), 'Path::Class::Dir' );
36 isa_ok( Catalyst::path_to( $context, $base, basename $0 ), 'Path::Class::File' );
38 my $config = Catalyst->config;
40 $config->{home} = '/home/sri/my-app/';
42 is( Catalyst::path_to( $context, 'foo' ), '/home/sri/my-app/foo', 'Unix path' );
44 $config->{home} = '/Users/sri/myapp/';
46 is( Catalyst::path_to( $context, 'foo', 'bar' ),
47 '/Users/sri/myapp/foo/bar', 'deep Unix path' );