diff options
author | Juan Barreneche <jbarreneche@restorando.com> | 2015-10-15 18:50:39 -0300 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-06-23 19:40:12 -0500 |
commit | 9c8dab3c0e9078637edd50049bdc2351d6d27458 (patch) | |
tree | b0bd9c684f5d4e5af1e3a234dc8b91365c8aaa83 | |
parent | fe7ed25f319f4bec6ad4856fd45093e4404c0c8e (diff) | |
download | bundler-9c8dab3c0e9078637edd50049bdc2351d6d27458.tar.gz |
Add failing test for invalid warning
# Conflicts:
# spec/install/gemfile/sources_spec.rb
-rw-r--r-- | spec/install/gemfile/sources_spec.rb | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/spec/install/gemfile/sources_spec.rb b/spec/install/gemfile/sources_spec.rb index 9d727118de..810d1862ef 100644 --- a/spec/install/gemfile/sources_spec.rb +++ b/spec/install/gemfile/sources_spec.rb @@ -180,10 +180,24 @@ RSpec.describe "bundle install with gems on multiple sources" do end end - it "installs from the same source without any warning" do - bundle :install - expect(out).not_to include("Warning") - expect(the_bundle).to include_gems("depends_on_rack 1.0.1", "rack 1.0.0") + context "when lockfile_uses_separate_rubygems_sources is set" do + before { bundle! "config lockfile_uses_separate_rubygems_sources true" } + + it "installs from the same source without any warning" do + bundle! :install + + expect(out).not_to include("Warning: the gem 'rack' was found in multiple sources.") + expect(err).not_to include("Warning: the gem 'rack' was found in multiple sources.") + expect(the_bundle).to include_gems("depends_on_rack 1.0.1", "rack 1.0.0") + + # when there is already a lock file, and the gems are missing, so try again + system_gems [] + bundle! :install + + expect(out).not_to include("Warning: the gem 'rack' was found in multiple sources.") + expect(err).not_to include("Warning: the gem 'rack' was found in multiple sources.") + expect(the_bundle).to include_gems("depends_on_rack 1.0.1", "rack 1.0.0") + end end end end |