diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2021-07-31 15:05:29 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-08-31 19:06:14 +0900 |
commit | 7116ec6199ea55756154167676bb0c8296f8a391 (patch) | |
tree | b870c41c5dfc483630b8fb7dbba735536da4f5ee /spec/bundler/install | |
parent | 0b4dbe2e6a0a0b27860fb6a509ff0429ece436c7 (diff) | |
download | ruby-7116ec6199ea55756154167676bb0c8296f8a391.tar.gz |
[rubygems/rubygems] Requiring `bundler/setup` shouldn't try to hit the network
https://github.com/rubygems/rubygems/commit/06f5efce02
Diffstat (limited to 'spec/bundler/install')
-rw-r--r-- | spec/bundler/install/gemfile/sources_spec.rb | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/spec/bundler/install/gemfile/sources_spec.rb b/spec/bundler/install/gemfile/sources_spec.rb index 72d05aa80e..9885145662 100644 --- a/spec/bundler/install/gemfile/sources_spec.rb +++ b/spec/bundler/install/gemfile/sources_spec.rb @@ -1280,7 +1280,7 @@ RSpec.describe "bundle install with gems on multiple sources" do expect(out).to include("Using example 0.1.0") end - it "fails inmmediately with a helpful error when a non retriable network error happens while resolving sources" do + it "fails inmmediately with a helpful error when a rubygems source does not exist and bundler/setup is required" do gemfile <<-G source "https://gem.repo1" @@ -1296,6 +1296,21 @@ RSpec.describe "bundle install with gems on multiple sources" do end expect(last_command).to be_failure + expect(err).to include("Could not find gem 'example' in locally installed gems.") + end + + it "fails inmmediately with a helpful error when a non retriable network error happens while resolving sources" do + gemfile <<-G + source "https://gem.repo1" + + source "https://gem.repo4" do + gem "example" + end + G + + bundle "install", :artifice => nil, :raise_on_error => false + + expect(last_command).to be_failure expect(err).to include("Could not reach host gem.repo4. Check your network connection and try again.") end |