diff options
author | David Rodriguez <deivid.rodriguez@riseup.net> | 2021-10-09 13:42:05 +0200 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-10-13 16:21:42 +0900 |
commit | 0f1f95a3e3011b6c61fdc455e4078e5e231548e3 (patch) | |
tree | 1ab166b20745e80b9a89118e8170fc6b4e91b7d4 /spec | |
parent | bd87397f73c36f1428b4cf8de24918b98fa71c8a (diff) |
[rubygems/rubygems] Fix `bundle install` to force reinstallation of deleted gems
https://github.com/rubygems/rubygems/commit/8950631f02
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/commands/install_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/bundler/commands/install_spec.rb b/spec/bundler/commands/install_spec.rb index 35c45b68b7..1e8d2295ba 100644 --- a/spec/bundler/commands/install_spec.rb +++ b/spec/bundler/commands/install_spec.rb @@ -94,6 +94,21 @@ RSpec.describe "bundle install with gem sources" do expect(the_bundle).to include_gems("rack 1.0.0") end + it "auto-heals missing gems" do + install_gemfile <<-G + source "#{file_uri_for(gem_repo1)}" + gem 'rack' + G + + FileUtils.rm_rf(default_bundle_path("gems/rack-1.0.0")) + + bundle "install --verbose" + + expect(out).to include("Installing rack 1.0.0") + expect(default_bundle_path("gems/rack-1.0.0")).to exist + expect(the_bundle).to include_gems("rack 1.0.0") + end + it "fetches gems when multiple versions are specified" do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" |