use inlined module hiding in tests
[catagits/Catalyst-Runtime.git] / t / aggregate / unit_core_path_to.t
CommitLineData
01033d73 1use strict;
2use warnings;
3
5b19d407 4use Test::More;
0891873b 5use FindBin;
6use Path::Class;
7use File::Basename;
78da9e75 8BEGIN {
9 delete $ENV{CATALYST_HOME}; # otherwise it'll set itself up to the wrong place
10}
11use lib "$FindBin::Bin/../lib";
12use TestApp;
01033d73 13
14my %non_unix = (
15 MacOS => 1,
16 MSWin32 => 1,
17 os2 => 1,
18 VMS => 1,
19 epoc => 1,
20 NetWare => 1,
21 dos => 1,
22 cygwin => 1
23);
24
25my $os = $non_unix{$^O} ? $^O : 'Unix';
26
0891873b 27if ( $os ne 'Unix' ) {
c7ded7aa 28 plan skip_all => 'tests require Unix';
5b19d407 29}
01033d73 30
01033d73 31use_ok('Catalyst');
32
78da9e75 33my $context = 'TestApp';
34my $base;
0891873b 35
78da9e75 36isa_ok( $base = Catalyst::path_to( $context, '' ), 'Path::Class::Dir' );
0891873b 37
fa32ac82 38my $config = Catalyst->config;
39
78da9e75 40is( Catalyst::path_to( $context, 'foo' ), "$base/foo", 'Unix path' );
01033d73 41
42is( Catalyst::path_to( $context, 'foo', 'bar' ),
78da9e75 43 "$base/foo/bar", 'deep Unix path' );
0891873b 44
45done_testing;