Bump version requirement for MX::Emulate::CAF to the new release which fixes the...
[catagits/Catalyst-Runtime.git] / t / unit_utils_subdir.t
CommitLineData
059c085b 1use Test::More tests=>7;
2
3use strict;
4use warnings;
5
6# simulates an entire testapp rooted at t/something
7# except without bothering creating it since its
8# only the -e check on the Makefile.PL that matters
9
10BEGIN { use_ok 'Catalyst::Utils' }
11use FindBin;
12
13$INC{'TestApp.pm'} = "$FindBin::Bin/something/script/foo/../../lib/TestApp.pm";
14my $home = Catalyst::Utils::home('TestApp');
15like($home, qr/t\/something/, "has path TestApp/t/something");
16unlike($home, qr/\/script\/foo/, "doesn't have path /script/foo");
17
18$INC{'TestApp.pm'} = "$FindBin::Bin/something/script/foo/bar/../../../lib/TestApp.pm";
19$home = Catalyst::Utils::home('TestApp');
20like($home, qr/t\/something/, "has path TestApp/t/something");
21unlike($home, qr/\/script\/foo\/bar/, "doesn't have path /script/foo");
22
23$INC{'TestApp.pm'} = "$FindBin::Bin/something/script/../lib/TestApp.pm";
24$home = Catalyst::Utils::home('TestApp');
25like($home, qr/t\/something/, "has path TestApp/t/something");
26unlike($home, qr/\/script\/foo/, "doesn't have path /script/foo");