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; |
5bdb6290 |
16 | |
17 | use base 'Catalyst::Plugin::ConfigLoader'; |
18 | |
19 | sub config { {} } |
b272be8d |
20 | sub path_to { shift; '/home/foo/QX-0.9.5/' . shift; } |
5bdb6290 |
21 | } |
22 | |
23 | my $app = bless {}, 'QX'; |
24 | my ($path, $extension) = $app->get_config_path; |
b272be8d |
25 | is $path, '/home/foo/QX-0.9.5/qx'; |
5bdb6290 |
26 | is $extension, undef; |
27 | |
28 | done_testing; |
29 | |