summaryrefslogtreecommitdiff
path: root/spec/bundler/commands/install_spec.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-08-18 19:37:11 +0900
committernagachika <nagachika@ruby-lang.org>2021-08-19 15:46:40 +0900
commit37f824377fce1bb0fb3ae94f858e2b9417b67b56 (patch)
tree262faa7f44212747afc4b694b0c67165d3f288ca /spec/bundler/commands/install_spec.rb
parent41a28637807bef9b15c404c93a778aaa6266ace7 (diff)
Merge RubyGems 3.2.26 and Bundler 2.2.26
Diffstat (limited to 'spec/bundler/commands/install_spec.rb')
-rw-r--r--spec/bundler/commands/install_spec.rb20
1 files changed, 19 insertions, 1 deletions
diff --git a/spec/bundler/commands/install_spec.rb b/spec/bundler/commands/install_spec.rb
index 412000341f..35c45b68b7 100644
--- a/spec/bundler/commands/install_spec.rb
+++ b/spec/bundler/commands/install_spec.rb
@@ -336,7 +336,7 @@ RSpec.describe "bundle install with gem sources" do
expect(err).to include("This Gemfile does not include an explicit global source. " \
"Not using an explicit global source may result in a different lockfile being generated depending on " \
- "the gems you have installed locally before bundler is run." \
+ "the gems you have installed locally before bundler is run. " \
"Instead, define a global source in your Gemfile like this: source \"https://rubygems.org\".")
end
@@ -759,4 +759,22 @@ RSpec.describe "bundle install with gem sources" do
)
end
end
+
+ context "with --local flag" do
+ before do
+ system_gems "rack-1.0.0", :path => default_bundle_path
+ end
+
+ it "respects installed gems without fetching any remote sources" do
+ install_gemfile <<-G, :local => true
+ source "#{file_uri_for(gem_repo1)}"
+
+ source "https://not-existing-source" do
+ gem "rack"
+ end
+ G
+
+ expect(last_command).to be_success
+ end
+ end
end