summaryrefslogtreecommitdiffstats
path: root/t/lib/Test/Class/Refresh.pm
diff options
context:
space:
mode:
Diffstat (limited to 't/lib/Test/Class/Refresh.pm')
-rw-r--r--t/lib/Test/Class/Refresh.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/t/lib/Test/Class/Refresh.pm b/t/lib/Test/Class/Refresh.pm
index 7720d62..5e3bf40 100644
--- a/t/lib/Test/Class/Refresh.pm
+++ b/t/lib/Test/Class/Refresh.pm
@@ -37,9 +37,10 @@ sub rcopy {
}
sub prepare_temp_dir_for {
- my ($test_id) = @_;
+ my ($test_id, $subdir) = @_;
+ $subdir ||= 'before';
- my $from_dir = 't/data/' . $test_id . '/before';
+ my $from_dir = 't/data/' . $test_id . "/$subdir";
my $to_dir = File::Temp->newdir;
rcopy($from_dir, $to_dir);
@@ -48,9 +49,10 @@ sub prepare_temp_dir_for {
}
sub update_temp_dir_for {
- my ($test_id, $to_dir) = @_;
+ my ($test_id, $to_dir, $subdir) = @_;
+ $subdir ||= 'after';
- my $from_dir = 't/data/' . $test_id . '/after';
+ my $from_dir = 't/data/' . $test_id . "/$subdir";
rcopy($from_dir, $to_dir);
}