summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2022-05-24 12:18:38 +0200
committergit <svn-admin@ruby-lang.org>2022-05-24 21:24:57 +0900
commit633608ebd4cbdeea562dc4c608495134965a19a9 (patch)
tree1f9347efb61d132ee68eff8688961c0cc7eb8eb0 /spec
parent08cee2bf804d22dc51002b0df023aea7ec044d8d (diff)
[rubygems/rubygems] Fix crash when printing resolution conflicts on metadata requirements
https://github.com/rubygems/rubygems/commit/b69e1e9374
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/install/gems/resolving_spec.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/bundler/install/gems/resolving_spec.rb b/spec/bundler/install/gems/resolving_spec.rb
index 469ecd412f..f23d137bc1 100644
--- a/spec/bundler/install/gems/resolving_spec.rb
+++ b/spec/bundler/install/gems/resolving_spec.rb
@@ -282,6 +282,27 @@ RSpec.describe "bundle install with install-time dependencies" do
expect(err).not_to include("That means the author of parallel_tests (3.8.0) has removed it.")
end
+ it "gives a meaningful error on ruby version mismatches between dependencies" do
+ build_repo4 do
+ build_gem "requires-old-ruby" do |s|
+ s.required_ruby_version = "< #{RUBY_VERSION}"
+ end
+ end
+
+ build_lib("foo", :path => bundled_app) do |s|
+ s.required_ruby_version = ">= #{RUBY_VERSION}"
+
+ s.add_dependency "requires-old-ruby"
+ end
+
+ install_gemfile <<-G, :raise_on_error => false
+ source "#{file_uri_for(gem_repo4)}"
+ gemspec
+ G
+
+ expect(err).to include("Bundler found conflicting requirements for the Ruby\0 version:")
+ end
+
it "installs the older version under rate limiting conditions" do
build_repo4 do
build_gem "rack", "9001.0.0" do |s|