diff --git a/spec/tasks/generate_manifest/task_spec.rb b/spec/tasks/generate_manifest/task_spec.rb index 626758542..0c8dd8b65 100644 --- a/spec/tasks/generate_manifest/task_spec.rb +++ b/spec/tasks/generate_manifest/task_spec.rb @@ -4,12 +4,10 @@ describe 'generate_manifest task' do - - after(:context) do - FileUtils.rm_rf @generated_files if File.exist? @generated_files - end - context 'when no template are detected' do + after(:context) do + FileUtils.rm_rf @generated_files + end before(:context) do @generated_files = Dir.mktmpdir @@ -52,6 +50,10 @@ 'SUFFIX' => '') end + after(:context) do + FileUtils.rm_rf @generated_files + end + it 'generates a file per valid template' do tpl_yml_files .map { |filename| File.basename(filename, '-tpl.yml') } .each do |base_filename|