diff options
author | Bundlerbot <bot@bundler.io> | 2019-06-14 14:32:27 +0000 |
---|---|---|
committer | Bundlerbot <bot@bundler.io> | 2019-06-14 14:32:27 +0000 |
commit | 0d4179037d5e0fc72a617f1043df672cf73e2eaa (patch) | |
tree | ebc80e8cc86a10c2e9b22aefc8ee00f364309108 /spec/spec_helper.rb | |
parent | 81f8d9f5f1ba4036b9c0744025c8a47c2e8471f5 (diff) | |
parent | 4f05417ca7de8a9b96c8c1fa1ed93f82c4aaaf7d (diff) | |
download | bundler-0d4179037d5e0fc72a617f1043df672cf73e2eaa.tar.gz |
Merge #7002
7002: Respect color option when instantiating shells r=deivid-rodriguez a=deivid-rodriguez
### What was the end-user problem that led to this PR?
The problem was that some specs have started to fail randomly in several unrelated PRs. See for example, https://travis-ci.org/bundler/bundler/jobs/500322731. Note that currently bundler specs always run in the same order ( :crying_cat_face: ), but enabling or disabling specs can still affect the final set of specs, and thus make this issue manifest.
### What was your diagnosis of the problem?
My diagnosis was that the base thor's shell is being memoized the first time bundler instantiates a shell. That means further instantiations will not respect the "--no-color" option.
### What is your fix for the problem, implemented in this PR?
My fix is to reset the base thor's shell the proper color / non-color one, every time we instantiate a new shell, not only when "--color" is given.
### Why did you choose this fix out of the possible options?
I chose this fix because it felt like a real issue that should be fixed in lib/, and not only with some state resetting hack inside the specs.
Co-authored-by: David RodrÃguez <deivid.rodriguez@riseup.net>
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index d3de1ff784..444f3a3cf3 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -74,6 +74,7 @@ RSpec.configure do |config| config.filter_run_excluding :rubygems_master => (ENV["RGV"] != "master") config.filter_run_excluding :bundler => RequirementChecker.against(Bundler::VERSION.split(".")[0]) config.filter_run_excluding :ruby_repo => !(ENV["BUNDLE_RUBY"] && ENV["BUNDLE_GEM"]).nil? + config.filter_run_excluding :non_windows => Gem.win_platform? config.filter_run_when_matching :focus unless ENV["CI"] |