summaryrefslogtreecommitdiff
path: root/spec/bundler/install/yanked_spec.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-08-02 12:07:39 +0900
committernagachika <nagachika@ruby-lang.org>2021-08-19 15:46:40 +0900
commit41a28637807bef9b15c404c93a778aaa6266ace7 (patch)
tree5a85615a3ff7fa753540f095f446babc1b5fe162 /spec/bundler/install/yanked_spec.rb
parent679185d6c87e0f2e4f6a5da5ce50d02c80ab31b1 (diff)
Merge RubyGems 3.2.25 and Bundler 2.2.25
Diffstat (limited to 'spec/bundler/install/yanked_spec.rb')
-rw-r--r--spec/bundler/install/yanked_spec.rb31
1 files changed, 31 insertions, 0 deletions
diff --git a/spec/bundler/install/yanked_spec.rb b/spec/bundler/install/yanked_spec.rb
index 6d3065a836..c5f3d788ba 100644
--- a/spec/bundler/install/yanked_spec.rb
+++ b/spec/bundler/install/yanked_spec.rb
@@ -70,4 +70,35 @@ RSpec.context "when using gem before installing" do
expect(err).to_not include("If you haven't changed sources, that means the author of rack (0.9.1) has removed it.")
expect(err).to_not include("You'll need to update your bundle to a different version of rack (0.9.1) that hasn't been removed in order to install.")
end
+
+ it "does not suggest the author has yanked the gem when using more than one gem, but shows all gems that couldn't be found in the source" do
+ gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+ gem "rack", "0.9.1"
+ gem "rack_middleware", "1.0"
+ G
+
+ lockfile <<-L
+ GEM
+ remote: #{file_uri_for(gem_repo1)}
+ specs:
+ rack (0.9.1)
+ rack_middleware (1.0)
+
+ PLATFORMS
+ ruby
+
+ DEPENDENCIES
+ rack (= 0.9.1)
+ rack_middleware (1.0)
+ L
+
+ bundle :list, :raise_on_error => false
+
+ expect(err).to include("Could not find rack-0.9.1, rack_middleware-1.0 in any of the sources")
+ expect(err).to include("Install missing gems with `bundle install`.")
+ expect(err).to_not include("Your bundle is locked to rack (0.9.1), but that version could not be found in any of the sources listed in your Gemfile.")
+ expect(err).to_not include("If you haven't changed sources, that means the author of rack (0.9.1) has removed it.")
+ expect(err).to_not include("You'll need to update your bundle to a different version of rack (0.9.1) that hasn't been removed in order to install.")
+ end
end