diff options
author | David Rodriguez <deivid.rodriguez@riseup.net> | 2024-03-15 19:10:32 +0100 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2024-03-22 13:14:42 +0000 |
commit | 7b3ef370f84cd0a2e7a8d3ce8717ae6dfa49319e (patch) | |
tree | aee4ba22f85edbb2fa9ec3616be0d95f762d5f72 /spec/bundler/commands/update_spec.rb | |
parent | 78e12beb6d6d7ab7db962f3985ccc718e0060b1a (diff) |
[rubygems/rubygems] Fix incorrect `bundle update --bundler` message
https://github.com/rubygems/rubygems/commit/146de56353
Diffstat (limited to 'spec/bundler/commands/update_spec.rb')
-rw-r--r-- | spec/bundler/commands/update_spec.rb | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/spec/bundler/commands/update_spec.rb b/spec/bundler/commands/update_spec.rb index 2bde5a1586..2a09e0531b 100644 --- a/spec/bundler/commands/update_spec.rb +++ b/spec/bundler/commands/update_spec.rb @@ -1422,6 +1422,43 @@ RSpec.describe "bundle update --bundler" do end end + it "does not claim to update to Bundler version to a wrong version when cached gems are present" do + pristine_system_gems "bundler-2.99.0" + + build_repo4 do + build_gem "rack", "3.0.9.1" + + build_bundler "2.99.0" + end + + gemfile <<~G + source "#{file_uri_for(gem_repo4)}" + gem "rack" + G + + lockfile <<~L + GEM + remote: #{file_uri_for(gem_repo4)}/ + specs: + rack (3.0.9.1) + + PLATFORMS + #{lockfile_platforms} + + DEPENDENCIES + rack + + BUNDLED WITH + 2.99.0 + L + + bundle :cache, verbose: true + + bundle :update, bundler: true, artifice: "compact_index", verbose: true, env: { "BUNDLER_SPEC_GEM_REPO" => gem_repo4.to_s } + + expect(out).not_to include("Updating bundler to") + end + it "does not update the bundler version in the lockfile if the latest version is not compatible with current ruby", :ruby_repo do pristine_system_gems "bundler-2.3.9" |