diff options
Diffstat (limited to 'qa/spec/spec_helper.rb')
-rw-r--r-- | qa/spec/spec_helper.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/qa/spec/spec_helper.rb b/qa/spec/spec_helper.rb index 640f2de0ca2..4372d9d2728 100644 --- a/qa/spec/spec_helper.rb +++ b/qa/spec/spec_helper.rb @@ -64,6 +64,13 @@ RSpec.configure do |config| end end + config.after(:suite) do |suite| + # If any tests failed, leave the resources behind to help troubleshoot + next if suite.reporter.failed_examples.present? + + QA::Resource::ReusableProject.remove_all_via_api! + end + config.expect_with :rspec do |expectations| expectations.include_chain_clauses_in_custom_matcher_descriptions = true end |