summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2023-01-07 18:57:45 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-01-10 12:58:28 +0900
commit2e0159c5f26e65b9bb6edc58c024bb551cc80024 (patch)
tree8dce661fbfaf5d06a995eec3fb773b87c9f4399a /spec
parent97d52a8ea230ccb236b63c06993c266ebb5431ca (diff)
downloadruby-2e0159c5f26e65b9bb6edc58c024bb551cc80024.tar.gz
[rubygems/rubygems] Fix resolver edge case
Let it deal with legacy gems with equivalent version and different dependencies. https://github.com/rubygems/rubygems/commit/b430babe97
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/commands/install_spec.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/bundler/commands/install_spec.rb b/spec/bundler/commands/install_spec.rb
index 56945346e1..f572bdf176 100644
--- a/spec/bundler/commands/install_spec.rb
+++ b/spec/bundler/commands/install_spec.rb
@@ -1076,4 +1076,31 @@ RSpec.describe "bundle install with gem sources" do
G
end
end
+
+ context "when a gem has equivalent versions with inconsistent dependencies" do
+ before do
+ build_repo4 do
+ build_gem "autobuild", "1.10.rc2" do |s|
+ s.add_dependency "utilrb", ">= 1.6.0"
+ end
+
+ build_gem "autobuild", "1.10.0.rc2" do |s|
+ s.add_dependency "utilrb", ">= 2.0"
+ end
+ end
+ end
+
+ it "does not crash unexpectedly" do
+ gemfile <<~G
+ source "#{file_uri_for(gem_repo4)}"
+
+ gem "autobuild", "1.10.rc2"
+ G
+
+ bundle "install --jobs 1", :raise_on_error => false
+
+ expect(err).not_to include("ERROR REPORT TEMPLATE")
+ expect(err).to include("Could not find compatible versions")
+ end
+ end
end