summaryrefslogtreecommitdiff
path: root/spec/commands/update_spec.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-01-10 09:56:42 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2020-01-12 20:46:33 +0100
commit7dc38a75680f991bf32320cca850c32d1dcd90ca (patch)
treee532f1f4eb42a0b9f438ef40380a1ab9ae810975 /spec/commands/update_spec.rb
parent55630c23f4e0683e820116af917888cf23569020 (diff)
downloadbundler-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/update_spec.rb')
-rw-r--r--spec/commands/update_spec.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/commands/update_spec.rb b/spec/commands/update_spec.rb
index 8455d140fe..5a7d26353c 100644
--- a/spec/commands/update_spec.rb
+++ b/spec/commands/update_spec.rb
@@ -831,6 +831,7 @@ RSpec.describe "bundle update --bundler" do
source "#{file_uri_for(gem_repo4)}"
gem "rack"
G
+ allow(Bundler::SharedHelpers).to receive(:find_gemfile).and_return(bundled_app_gemfile)
lockfile lockfile.sub(/(^\s*)#{Bundler::VERSION}($)/, '\11.0.0\2')
FileUtils.rm_r gem_repo4