diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-01-10 09:56:42 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-01-12 20:46:33 +0100 |
commit | 7dc38a75680f991bf32320cca850c32d1dcd90ca (patch) | |
tree | e532f1f4eb42a0b9f438ef40380a1ab9ae810975 /spec/commands/pristine_spec.rb | |
parent | 55630c23f4e0683e820116af917888cf23569020 (diff) | |
download | bundler-7dc38a75680f991bf32320cca850c32d1dcd90ca.tar.gz |
Remove global directory switching from specstests/less_flakyness
`Dir.chdir` is not thread safe, so it makes our parallel specs flaky.
Instead, use the following alternatives:
* Use `:chdir` parameter to `Open3` methods for specs that shell out.
* Stub `find_gemfile` or other relevant helpers for unit tests.
Diffstat (limited to 'spec/commands/pristine_spec.rb')
-rw-r--r-- | spec/commands/pristine_spec.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/commands/pristine_spec.rb b/spec/commands/pristine_spec.rb index 1c267ab78f..15336137b6 100644 --- a/spec/commands/pristine_spec.rb +++ b/spec/commands/pristine_spec.rb @@ -28,6 +28,8 @@ RSpec.describe "bundle pristine", :ruby_repo do gemspec G + + allow(Bundler::SharedHelpers).to receive(:find_gemfile).and_return(bundled_app_gemfile) end context "when sourced from RubyGems" do |