clean output dir after testing
This commit is contained in:
1
dist.ini
1
dist.ini
@@ -20,6 +20,7 @@ CSS::Minifier::XS = 0
|
||||
|
||||
[GatherDir]
|
||||
include_dotfiles = 1
|
||||
exclude_match = t/public
|
||||
|
||||
[PruneCruft]
|
||||
|
||||
|
||||
@@ -238,8 +238,7 @@ sub copy_files {
|
||||
|
||||
my $aggregate_digest = $self->full_digest->hexdigest;
|
||||
|
||||
my $output_path = Path::Class::Dir->new( $self->output_path );
|
||||
$output_path->rmtree();
|
||||
$self->clean_output();
|
||||
|
||||
$l->info( 'Copying ', $self->asset_cache_count, ' files', );
|
||||
for my $value ( $self->asset_cache_values ) {
|
||||
@@ -248,6 +247,13 @@ sub copy_files {
|
||||
return;
|
||||
}
|
||||
|
||||
sub clean_output {
|
||||
my $self = shift;
|
||||
my $output_path = Path::Class::Dir->new( $self->output_path );
|
||||
$output_path->rmtree();
|
||||
return;
|
||||
}
|
||||
|
||||
sub _process_file {
|
||||
my $self = shift;
|
||||
my $asset = shift;
|
||||
|
||||
@@ -40,6 +40,7 @@ for my $key ( keys %expected_result ) {
|
||||
}
|
||||
}
|
||||
|
||||
$fap->clean_output();
|
||||
done_testing();
|
||||
|
||||
sub expected_result {
|
||||
|
||||
Reference in New Issue
Block a user