summaryrefslogtreecommitdiff
path: root/spec/bundler/commands/install_spec.rb
diff options
context:
space:
mode:
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