summaryrefslogtreecommitdiff
path: root/spec/install
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2020-01-17 11:14:32 +0000
committerBundlerbot <bot@bundler.io>2020-01-17 11:14:32 +0000
commit3d4abdd0f69f919476ea5410e9cc90214ce052f4 (patch)
treed0f6571a84b5d10b0a3c70fa4727f0f2c1cb6339 /spec/install
parentdfb128fc09e5239c3b226d4f818cd1484ae29145 (diff)
parent394cd143f007e03db70d72c353bf5d3752139b21 (diff)
downloadbundler-3d4abdd0f69f919476ea5410e9cc90214ce052f4.tar.gz
Merge #7559
7559: Reactivate usused code for ruby version resolution r=deivid-rodriguez a=larskanis The code was changed in commit 38b0e7ed64c3ca1c40f43c5aa9a1ead2f6cd7049 so that RubyVersion.system was no longer respected. This is reactivated now and specs are adjusted accordingly. ### What was the end-user problem that led to this PR? Not known. ### What was your diagnosis of the problem? I read the bundler source code and noticed this. ### What is your fix for the problem, implemented in this PR? My fix re-adds the ruby version as it was before commit 38b0e7ed64c3ca1c40f43c5aa9a1ead2f6cd7049 , since it seems to be a mistake. ### Why did you choose this fix out of the possible options? As a alternative I added #7558 that removes the code in question. Co-authored-by: Lars Kanis <kanis@comcard.de>
Diffstat (limited to 'spec/install')
-rw-r--r--spec/install/gems/resolving_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/install/gems/resolving_spec.rb b/spec/install/gems/resolving_spec.rb
index fc2936b28c..d0448ca30b 100644
--- a/spec/install/gems/resolving_spec.rb
+++ b/spec/install/gems/resolving_spec.rb
@@ -219,7 +219,7 @@ RSpec.describe "bundle install with install-time dependencies" do
describe "with a < requirement" do
let(:ruby_requirement) { %("< 5000") }
- let(:error_message_requirement) { "< 5000" }
+ let(:error_message_requirement) { Gem::Requirement.new(["< 5000", "= #{RUBY_VERSION}.#{RUBY_PATCHLEVEL}"]).to_s }
it_behaves_like "ruby version conflicts"
end
@@ -227,7 +227,7 @@ RSpec.describe "bundle install with install-time dependencies" do
describe "with a compound requirement" do
let(:reqs) { ["> 0.1", "< 5000"] }
let(:ruby_requirement) { reqs.map(&:dump).join(", ") }
- let(:error_message_requirement) { Gem::Requirement.new(reqs).to_s }
+ let(:error_message_requirement) { Gem::Requirement.new(reqs + ["= #{RUBY_VERSION}.#{RUBY_PATCHLEVEL}"]).to_s }
it_behaves_like "ruby version conflicts"
end