Commit | Line | Data |
5bdb6290 |
1 | use strict; |
2 | use warnings; |
3 | use Test::More; |
4 | |
1818b6bc |
5 | BEGIN { |
6 | # Remove all relevant env variables to avoid accidental fail |
7 | foreach my $name ( grep { m{^(CATALYST)} } keys %ENV ) { |
8 | delete $ENV{ $name }; |
9 | } |
10 | } |
11 | |
5bdb6290 |
12 | { |
13 | package QX; |
14 | use strict; |
15 | use warnings; |
16 | use Path::Class (); |
17 | |
18 | use base 'Catalyst::Plugin::ConfigLoader'; |
19 | |
20 | sub config { {} } |
21 | sub path_to { shift; Path::Class::dir('/home/foo/QX-0.9.5/' . shift); } |
22 | } |
23 | |
24 | my $app = bless {}, 'QX'; |
25 | my ($path, $extension) = $app->get_config_path; |
b8535960 |
26 | is $path, Path::Class::dir( '/home/foo/QX-0.9.5/qx' )->stringify; |
5bdb6290 |
27 | is $extension, undef; |
28 | |
29 | done_testing; |
30 | |