File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,11 @@ use File::Temp qw/tempdir/;
5
5
use File::Spec;
6
6
7
7
my $log_dir = tempdir( CLEANUP => 1 );
8
+ sub config_location {
9
+ my ($app ) = @_ ;
10
+ my %config_readers = map { $_ -> {name } => $_ } @{ $app -> config_reader-> config_readers };
11
+ return $config_readers { ' File::Simple' }-> config_location;
12
+ }
8
13
9
14
{
10
15
package LogDirSpecified ;
@@ -56,7 +61,7 @@ my $check_cb = sub {
56
61
57
62
is(
58
63
$logger -> location,
59
- $app -> config_location ,
64
+ config_location( $app ) ,
60
65
' Logger got correct location' ,
61
66
);
62
67
@@ -96,7 +101,7 @@ subtest 'test Logger::File with log_dir NOT specified' => sub {
96
101
97
102
$check_cb -> (
98
103
$app ,
99
- File::Spec-> catdir( $app -> config_location , ' logs' ),
104
+ File::Spec-> catdir( config_location( $app ) , ' logs' ),
100
105
$app -> environment . ' .log' ,
101
106
);
102
107
};
@@ -116,4 +121,3 @@ subtest 'test Logger::File with non-existent log_dir specified' => sub {
116
121
' test_log.log' ,
117
122
);
118
123
};
119
-
You can’t perform that action at this time.
0 commit comments