summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVít Ondruch <vondruch@redhat.com>2017-11-29 17:27:46 +0100
committerVít Ondruch <vondruch@redhat.com>2017-11-30 08:43:53 +0100
commitf7bc71e354f779c3774fb62479279d63f618ab3c (patch)
tree422a38d5ae50af340ad173b3c91f1aba72964dcb
parent778dcf58506b99fc7923a1ae530f1353dee9a4d4 (diff)
downloadbundler-f7bc71e354f779c3774fb62479279d63f618ab3c.tar.gz
Be more precise when replacing Bundler version in lock file.
Lets say the current Bundler version is 1.16.0. If the test suite is, by a chance, executed in directory which contains such version string, this path is stored in Gemfile.lock file. Later, the test tries to replace the version of Bundler in the lock file, but instead, it replaces the version in path. Be more careful what should be actually replaced. This is related to #6185 although it does not resolve the original concern.
-rw-r--r--spec/commands/update_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/commands/update_spec.rb b/spec/commands/update_spec.rb
index a2842f0998..33679dd649 100644
--- a/spec/commands/update_spec.rb
+++ b/spec/commands/update_spec.rb
@@ -657,7 +657,7 @@ RSpec.describe "bundle update --bundler" do
source "file:#{gem_repo4}"
gem "rack"
G
- lockfile lockfile.sub(Bundler::VERSION, "1.0.0")
+ lockfile lockfile.sub(/(^\s*)#{Bundler::VERSION}($)/, '\11.0.0\2')
FileUtils.rm_r gem_repo4