summaryrefslogtreecommitdiff
path: root/spec/commands/clean_spec.rb
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2020-01-13 08:45:23 +0000
committerBundlerbot <bot@bundler.io>2020-01-13 08:45:23 +0000
commitcb96a16c9b7ffbb50c9929be7058ab1f4a552ca3 (patch)
treee532f1f4eb42a0b9f438ef40380a1ab9ae810975 /spec/commands/clean_spec.rb
parent971d39b32d3ec8bfcdc951061c88e364f864423e (diff)
parent7dc38a75680f991bf32320cca850c32d1dcd90ca (diff)
downloadbundler-cb96a16c9b7ffbb50c9929be7058ab1f4a552ca3.tar.gz
Merge #7568
7568: Make parallel tests more stable r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that since we run parallel tests by default, our CI is much less stable even though specs are faster. ### What was your diagnosis of the problem? My diagnosis was that our specs change folders back and forth for every test, and that's not thread safe. ### What is your fix for the problem, implemented in this PR? My fix is to stop changing folders in the main process during our specs. ### Why did you choose this fix out of the possible options? I chose this fix because it should improve stability of our specs. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
Diffstat (limited to 'spec/commands/clean_spec.rb')
-rw-r--r--spec/commands/clean_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/commands/clean_spec.rb b/spec/commands/clean_spec.rb
index 471ddb0805..590852b02d 100644
--- a/spec/commands/clean_spec.rb
+++ b/spec/commands/clean_spec.rb
@@ -585,11 +585,11 @@ RSpec.describe "bundle clean" do
bundle "install"
# mimic 7 length git revisions in Gemfile.lock
- gemfile_lock = File.read(bundled_app("Gemfile.lock")).split("\n")
+ gemfile_lock = File.read(bundled_app_lock).split("\n")
gemfile_lock.each_with_index do |line, index|
gemfile_lock[index] = line[0..(11 + 7)] if line.include?(" revision:")
end
- lockfile(bundled_app("Gemfile.lock"), gemfile_lock.join("\n"))
+ lockfile(bundled_app_lock, gemfile_lock.join("\n"))
bundle "config set path vendor/bundle"
bundle "install"