From c196c274232aa8d541d0886a136752385f0cda17 Mon Sep 17 00:00:00 2001 From: Vyacheslav Alexeev Date: Tue, 1 Sep 2020 22:20:13 +0300 Subject: [PATCH] override capture_exceptions --- test/helpers/tmp_path.rb | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/test/helpers/tmp_path.rb b/test/helpers/tmp_path.rb index f9fbe741..9d298a60 100644 --- a/test/helpers/tmp_path.rb +++ b/test/helpers/tmp_path.rb @@ -1,14 +1,11 @@ module TmpPath - def run(*args) - begin - result = super(*args) - rescue Interrupt - clean_tmp_paths - raise - end - + def capture_exceptions + super + rescue + clean_tmp_paths + raise + ensure clean_tmp_paths - result end private