summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-03-05 20:29:38 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2020-03-06 14:01:37 +0100
commite687f448023b8c9d84f0bb42b8dc5019fa189200 (patch)
treedd6724e80741d987838a614d22d0ae18c82d12f8
parent0cdda75528bdfe3f79f4f40c533cbdb2fba16eae (diff)
downloadbundler-e687f448023b8c9d84f0bb42b8dc5019fa189200.tar.gz
Cleanup after each spec
Each spec should be responsible of cleaning up after itself as opposed to cleaning up stuff left around by other specs. So, althouhg in this case it doesn't really matter, cleaning up _after_ is a better practice in my opinion.
-rw-r--r--spec/spec_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 0074cb81d8..ee234bfdeb 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -101,13 +101,13 @@ RSpec.configure do |config|
config.around :each do |example|
ENV.replace(original_env)
- reset!
system_gems []
-
@command_executions = []
Bundler.ui.silence { example.run }
+ reset!
+
all_output = @command_executions.map(&:to_s_verbose).join("\n\n")
if example.exception && !all_output.empty?
warn all_output unless config.formatters.grep(RSpec::Core::Formatters::DocumentationFormatter).empty?