aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2023-08-28 18:31:52 -0700
committergit <svn-admin@ruby-lang.org>2023-08-29 19:31:36 +0000
commit7a5df9d0ed7cbd0660803074b34623a1f1dc0768 (patch)
tree0cb3c6c11b33bd9ed8b576baf669ee5f896b02e7 /spec
parentf37f357e808a7435f56946cd603a333feba7691b (diff)
downloadruby-7a5df9d0ed7cbd0660803074b34623a1f1dc0768.tar.gz
[rubygems/rubygems] Fix bundle update --redownload
It now does the redownloading/installing just like bundle install --redownload https://github.com/rubygems/rubygems/commit/3b058e5eca
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/update/redownload_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/bundler/update/redownload_spec.rb b/spec/bundler/update/redownload_spec.rb
index 147be823f5..b55593d077 100644
--- a/spec/bundler/update/redownload_spec.rb
+++ b/spec/bundler/update/redownload_spec.rb
@@ -30,5 +30,15 @@ RSpec.describe "bundle update" do
bundle "update rack --no-color --redownload"
expect(err).not_to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`"
end
+
+ it "re-installs installed gems" do
+ rack_lib = default_bundle_path("gems/rack-1.0.0/lib/rack.rb")
+ rack_lib.open("w") {|f| f.write("blah blah blah") }
+ bundle :update, :redownload => true
+
+ expect(out).to include "Installing rack 1.0.0"
+ expect(rack_lib.open(&:read)).to eq("RACK = '1.0.0'\n")
+ expect(the_bundle).to include_gems "rack 1.0.0"
+ end
end
end