From 93c7f551c09f7cc8badbcc4da2488d1664909f95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 27 Feb 2019 00:20:05 +0100 Subject: Remove unnecessary gsub --- spec/other/major_deprecation_spec.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb index ef51112d72..6e20d254ab 100644 --- a/spec/other/major_deprecation_spec.rb +++ b/spec/other/major_deprecation_spec.rb @@ -213,8 +213,6 @@ The :bitbucket git source is deprecated, and will be removed in Bundler 2.0. Add bundle! :show - warnings.gsub!(/gems included.*?\[DEPRECATED/im, "[DEPRECATED") - expect(warnings).to have_major_deprecation a_string_including("use `bundle list` instead of `bundle show`") end end -- cgit v1.2.1 From ec56cdbd64c9ba920946e0fc3e823257189c8196 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 27 Feb 2019 00:20:20 +0100 Subject: Move some test setups to before blocks --- spec/install/gemfile/sources_spec.rb | 7 ++++--- spec/other/major_deprecation_spec.rb | 8 ++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/spec/install/gemfile/sources_spec.rb b/spec/install/gemfile/sources_spec.rb index c8f46e48c8..b29346c800 100644 --- a/spec/install/gemfile/sources_spec.rb +++ b/spec/install/gemfile/sources_spec.rb @@ -54,11 +54,11 @@ RSpec.describe "bundle install with gems on multiple sources" do gem "rack-obama" gem "rack", "1.0.0" # force it to install the working version in repo1 G - end - it "warns about ambiguous gems, but installs anyway", :bundler => "< 2" do bundle :install + end + it "warns about ambiguous gems, but installs anyway", :bundler => "< 2" do expect(out).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") expect(out).to include("Warning: the gem 'rack' was found in multiple sources.") expect(out).to include(normalize_uri_file("Installed from: file://localhost#{gem_repo1}")) @@ -244,10 +244,11 @@ RSpec.describe "bundle install with gems on multiple sources" do gem "depends_on_rack" end G + + bundle :install end it "installs from the other source and warns about ambiguous gems", :bundler => "< 2" do - bundle :install expect(out).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") expect(out).to include("Warning: the gem 'rack' was found in multiple sources.") expect(out).to include(normalize_uri_file("Installed from: file://localhost#{gem_repo2}")) diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb index 6e20d254ab..da8d1f56f4 100644 --- a/spec/other/major_deprecation_spec.rb +++ b/spec/other/major_deprecation_spec.rb @@ -205,22 +205,26 @@ The :bitbucket git source is deprecated, and will be removed in Bundler 2.0. Add end context "bundle show" do - it "prints a deprecation warning" do + before do install_gemfile! <<-G source "file://#{gem_repo1}" gem "rack" G bundle! :show + end + it "prints a deprecation warning" do expect(warnings).to have_major_deprecation a_string_including("use `bundle list` instead of `bundle show`") end end context "bundle console" do - it "prints a deprecation warning" do + before do bundle "console" + end + it "prints a deprecation warning" do expect(warnings).to have_major_deprecation \ a_string_including("bundle console will be replaced by `bin/console` generated by `bundle gem `") end -- cgit v1.2.1 From f89bca863fdaec498d19b2aabe88653a5c585d84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 20 Feb 2019 15:56:01 +0100 Subject: Delay requiring --all to update everything to bundler 3 Since we haven't even yet deprecated the old behavior. --- lib/bundler/feature_flag.rb | 2 +- spec/other/major_deprecation_spec.rb | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/bundler/feature_flag.rb b/lib/bundler/feature_flag.rb index 0adbd9190f..4dd104e3b2 100644 --- a/lib/bundler/feature_flag.rb +++ b/lib/bundler/feature_flag.rb @@ -54,7 +54,7 @@ module Bundler settings_flag(:specific_platform) { bundler_2_mode? } settings_flag(:suppress_install_using_messages) { bundler_2_mode? } settings_flag(:unlock_source_unlocks_spec) { !bundler_2_mode? } - settings_flag(:update_requires_all_flag) { bundler_2_mode? } + settings_flag(:update_requires_all_flag) { bundler_3_mode? } settings_flag(:use_gem_version_promoter_for_major_updates) { bundler_2_mode? } settings_flag(:viz_command) { !bundler_2_mode? } diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb index da8d1f56f4..09c3bdb7fa 100644 --- a/spec/other/major_deprecation_spec.rb +++ b/spec/other/major_deprecation_spec.rb @@ -45,7 +45,12 @@ RSpec.describe "major deprecations", :bundler => "< 2" do bundle! "install" end - it "warns when no options are given" do + it "does not warn when no options are given", :bundler => "< 2" do + bundle! "update" + expect(warnings).not_to have_major_deprecation + end + + it "warns when no options are given", :bundler => "2" do bundle! "update" expect(warnings).to have_major_deprecation a_string_including("Pass --all to `bundle update` to update everything") end -- cgit v1.2.1 From 4fbf085ea2748436755751e59240f3ab042cfcd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 26 Feb 2019 22:05:24 +0100 Subject: Remove unnecessary gems.rb file creation Not necessary for the test since the main before block already creates one. --- spec/other/major_deprecation_spec.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb index 09c3bdb7fa..9f222e6046 100644 --- a/spec/other/major_deprecation_spec.rb +++ b/spec/other/major_deprecation_spec.rb @@ -41,7 +41,6 @@ RSpec.describe "major deprecations", :bundler => "< 2" do describe "bundle update" do before do - create_file("gems.rb", "") bundle! "install" end -- cgit v1.2.1 From a30cd4b6f4c92372b9c8581eec6e38fb5c610c59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 26 Feb 2019 22:24:46 +0100 Subject: Delay `bundle console` removal to bundler 3 --- lib/bundler/feature_flag.rb | 2 +- spec/other/major_deprecation_spec.rb | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/bundler/feature_flag.rb b/lib/bundler/feature_flag.rb index 4dd104e3b2..e98ed8dabf 100644 --- a/lib/bundler/feature_flag.rb +++ b/lib/bundler/feature_flag.rb @@ -33,7 +33,7 @@ module Bundler settings_flag(:auto_config_jobs) { bundler_2_mode? } settings_flag(:cache_all) { bundler_2_mode? } settings_flag(:cache_command_is_package) { bundler_2_mode? } - settings_flag(:console_command) { !bundler_2_mode? } + settings_flag(:console_command) { !bundler_3_mode? } settings_flag(:default_install_uses_path) { bundler_2_mode? } settings_flag(:deployment_means_frozen) { bundler_2_mode? } settings_flag(:disable_multisource) { bundler_2_mode? } diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb index 9f222e6046..03f86eff7b 100644 --- a/spec/other/major_deprecation_spec.rb +++ b/spec/other/major_deprecation_spec.rb @@ -228,7 +228,11 @@ The :bitbucket git source is deprecated, and will be removed in Bundler 2.0. Add bundle "console" end - it "prints a deprecation warning" do + it "does not print a deprecation warning", :bundler => "< 2" do + expect(warnings).not_to have_major_deprecation + end + + it "prints a deprecation warning", :bundler => "2" do expect(warnings).to have_major_deprecation \ a_string_including("bundle console will be replaced by `bin/console` generated by `bundle gem `") end -- cgit v1.2.1 From cc7faa030aa89f2a8bc38abe2b14e1c902751bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 27 Feb 2019 00:48:48 +0100 Subject: Adapt `bundle show` deprecation specs --- spec/other/major_deprecation_spec.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb index 03f86eff7b..942007844c 100644 --- a/spec/other/major_deprecation_spec.rb +++ b/spec/other/major_deprecation_spec.rb @@ -218,7 +218,11 @@ The :bitbucket git source is deprecated, and will be removed in Bundler 2.0. Add bundle! :show end - it "prints a deprecation warning" do + it "does not print a deprecation warning", :bundler => "< 2" do + expect(warnings).not_to have_major_deprecation + end + + it "prints a deprecation warning", :bundler => "2" do expect(warnings).to have_major_deprecation a_string_including("use `bundle list` instead of `bundle show`") end end -- cgit v1.2.1 From 9c0701d5f3d6728f9b6a1c26827e12f2e1c0d80c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 26 Feb 2019 21:56:34 +0100 Subject: Fix major deprecation matcher The previous logic was broken. Previously, changing the expectation about gems.rb vs Gemfile deprecation to ```ruby expect(warnings).to have_major_deprecation("gems.rb is preferred to chocolate ice-cream") ``` would still pass. --- spec/other/major_deprecation_spec.rb | 6 +++--- spec/support/matchers.rb | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb index 942007844c..2aab4d07e9 100644 --- a/spec/other/major_deprecation_spec.rb +++ b/spec/other/major_deprecation_spec.rb @@ -61,7 +61,7 @@ RSpec.describe "major deprecations", :bundler => "< 2" do end describe "bundle install --binstubs" do - it "should output a deprecation warning" do + xit "should output a deprecation warning" do gemfile <<-G gem 'rack' G @@ -83,7 +83,7 @@ RSpec.describe "major deprecations", :bundler => "< 2" do expect(warnings_without_version_messages).not_to have_major_deprecation end - it "should print a Gemfile deprecation warning" do + xit "should print a Gemfile deprecation warning" do create_file "gems.rb" install_gemfile! <<-G source "file://#{gem_repo1}" @@ -95,7 +95,7 @@ RSpec.describe "major deprecations", :bundler => "< 2" do end context "with flags" do - it "should print a deprecation warning about autoremembering flags" do + xit "should print a deprecation warning about autoremembering flags" do install_gemfile <<-G, :path => "vendor/bundle" source "file://#{gem_repo1}" gem "rack" diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb index c39f2881a6..8f0c1e5f91 100644 --- a/spec/support/matchers.rb +++ b/spec/support/matchers.rb @@ -74,8 +74,7 @@ module Spec match do |actual| deprecations = actual.split(MAJOR_DEPRECATION) - return !expected.nil? if deprecations.size <= 1 - return true if expected.nil? + return !expected.nil? if deprecations.empty? deprecations.any? do |d| !d.empty? && values_match?(expected, d.strip) -- cgit v1.2.1 From 3b24acce0fa2f3fa1e6330acb47bbce13697321a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 26 Feb 2019 22:31:18 +0100 Subject: Make sure deprecation specs run on bundler 2 And skip the rest of the broken ones. --- spec/other/major_deprecation_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb index 2aab4d07e9..f01f313faa 100644 --- a/spec/other/major_deprecation_spec.rb +++ b/spec/other/major_deprecation_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true -RSpec.describe "major deprecations", :bundler => "< 2" do - let(:warnings) { last_command.bundler_err } # change to err in 2.0 +RSpec.describe "major deprecations" do + let(:warnings) { err } let(:warnings_without_version_messages) { warnings.gsub(/#{Spec::Matchers::MAJOR_DEPRECATION}Bundler will only support ruby >= .*/, "") } before do @@ -143,7 +143,7 @@ RSpec.describe "major deprecations", :bundler => "< 2" do end end - describe Bundler::Dsl do + xdescribe Bundler::Dsl do before do @rubygems = double("rubygems") allow(Bundler::Source::Rubygems).to receive(:new) { @rubygems } -- cgit v1.2.1 From ae11272b8afe7adc7b5ad297bcd14afe39e397a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 26 Feb 2019 22:48:13 +0100 Subject: Remove now unnecessary filtering Those deprecation messages are no longer printed. --- spec/other/major_deprecation_spec.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb index f01f313faa..445c970c4c 100644 --- a/spec/other/major_deprecation_spec.rb +++ b/spec/other/major_deprecation_spec.rb @@ -2,7 +2,6 @@ RSpec.describe "major deprecations" do let(:warnings) { err } - let(:warnings_without_version_messages) { warnings.gsub(/#{Spec::Matchers::MAJOR_DEPRECATION}Bundler will only support ruby >= .*/, "") } before do create_file "gems.rb", <<-G @@ -35,7 +34,7 @@ RSpec.describe "major deprecations" do describe "bundle update --quiet" do it "does not print any deprecations" do bundle :update, :quiet => true - expect(warnings_without_version_messages).not_to have_major_deprecation + expect(warnings).not_to have_major_deprecation end end @@ -56,7 +55,7 @@ RSpec.describe "major deprecations" do it "does not warn when --all is passed" do bundle! "update --all" - expect(warnings_without_version_messages).not_to have_major_deprecation + expect(warnings).not_to have_major_deprecation end end @@ -80,7 +79,7 @@ RSpec.describe "major deprecations" do G bundle :install - expect(warnings_without_version_messages).not_to have_major_deprecation + expect(warnings).not_to have_major_deprecation end xit "should print a Gemfile deprecation warning" do @@ -126,7 +125,7 @@ RSpec.describe "major deprecations" do Bundler.setup RUBY - expect(warnings_without_version_messages).to have_major_deprecation("gems.rb and gems.locked will be preferred to Gemfile and Gemfile.lock.") + expect(warnings).to have_major_deprecation("gems.rb and gems.locked will be preferred to Gemfile and Gemfile.lock.") end end -- cgit v1.2.1 From c425c5cd2b987a5b4c2c397b5308618241dcacbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 27 Feb 2019 09:52:15 +0100 Subject: Prefer the `err` helper for checking errors The helper already considers the stream errors are printed to. --- spec/install/gemfile/sources_spec.rb | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/spec/install/gemfile/sources_spec.rb b/spec/install/gemfile/sources_spec.rb index b29346c800..96aa5a1803 100644 --- a/spec/install/gemfile/sources_spec.rb +++ b/spec/install/gemfile/sources_spec.rb @@ -30,9 +30,9 @@ RSpec.describe "bundle install with gems on multiple sources" do it "warns about ambiguous gems, but installs anyway, prioritizing sources last to first", :bundler => "< 2" do bundle :install - expect(out).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") - expect(out).to include("Warning: the gem 'rack' was found in multiple sources.") - expect(out).to include(normalize_uri_file("Installed from: file://localhost#{gem_repo1}")) + expect(err).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") + expect(err).to include("Warning: the gem 'rack' was found in multiple sources.") + expect(err).to include(normalize_uri_file("Installed from: file://localhost#{gem_repo1}")) expect(the_bundle).to include_gems("rack-obama 1.0.0", "rack 1.0.0", :source => "remote1") end @@ -59,9 +59,9 @@ RSpec.describe "bundle install with gems on multiple sources" do end it "warns about ambiguous gems, but installs anyway", :bundler => "< 2" do - expect(out).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") - expect(out).to include("Warning: the gem 'rack' was found in multiple sources.") - expect(out).to include(normalize_uri_file("Installed from: file://localhost#{gem_repo1}")) + expect(err).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") + expect(err).to include("Warning: the gem 'rack' was found in multiple sources.") + expect(err).to include(normalize_uri_file("Installed from: file://localhost#{gem_repo1}")) expect(the_bundle).to include_gems("rack-obama 1.0.0", "rack 1.0.0", :source => "remote1") end end @@ -249,9 +249,9 @@ RSpec.describe "bundle install with gems on multiple sources" do end it "installs from the other source and warns about ambiguous gems", :bundler => "< 2" do - expect(out).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") - expect(out).to include("Warning: the gem 'rack' was found in multiple sources.") - expect(out).to include(normalize_uri_file("Installed from: file://localhost#{gem_repo2}")) + expect(err).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") + expect(err).to include("Warning: the gem 'rack' was found in multiple sources.") + expect(err).to include(normalize_uri_file("Installed from: file://localhost#{gem_repo2}")) expect(the_bundle).to include_gems("depends_on_rack 1.0.1", "rack 1.0.0") end end @@ -277,7 +277,7 @@ RSpec.describe "bundle install with gems on multiple sources" do it "installs the dependency from the pinned source without warning", :bundler => "< 2" 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") # In https://github.com/bundler/bundler/issues/3585 this failed @@ -285,7 +285,7 @@ RSpec.describe "bundle install with gems on multiple sources" do 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 @@ -330,7 +330,7 @@ RSpec.describe "bundle install with gems on multiple sources" do it "installs all gems without warning" do bundle :install - expect(out).not_to include("Warning") + expect(err).not_to include("Warning") expect(the_bundle).to include_gems("depends_on_rack 1.0.1", "rack 1.0.0", "unrelated_gem 1.0.0") end end @@ -365,7 +365,7 @@ RSpec.describe "bundle install with gems on multiple sources" do it "installs the dependency from the top-level source without warning" do bundle :install - expect(out).not_to include("Warning") + expect(err).not_to include("Warning") expect(the_bundle).to include_gems("depends_on_rack 1.0.1", "rack 1.0.0", "unrelated_gem 1.0.0") end end @@ -454,7 +454,7 @@ RSpec.describe "bundle install with gems on multiple sources" do it "installs the gems without any warning" do bundle :install - expect(out).not_to include("Warning") + expect(err).not_to include("Warning") expect(the_bundle).to include_gems("rack 1.0.0") end end @@ -632,7 +632,7 @@ RSpec.describe "bundle install with gems on multiple sources" do gem "depends_on_rack" G expect(last_command).to be_failure - expect(last_command.stderr).to eq normalize_uri_file(strip_whitespace(<<-EOS).strip) + expect(err).to eq normalize_uri_file(strip_whitespace(<<-EOS).strip) The gem 'rack' was found in multiple relevant sources. * rubygems repository file://localhost#{gem_repo1}/ or installed locally * rubygems repository file://localhost#{gem_repo4}/ or installed locally -- cgit v1.2.1 From 280307575c8a6ba550469498fcf1c7a91ae88026 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 27 Feb 2019 09:55:19 +0100 Subject: Split (and skip) specs about multiple source deprecation I'll get to this on a separate PR. --- spec/install/gemfile/sources_spec.rb | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/spec/install/gemfile/sources_spec.rb b/spec/install/gemfile/sources_spec.rb index 96aa5a1803..f9e5d072bf 100644 --- a/spec/install/gemfile/sources_spec.rb +++ b/spec/install/gemfile/sources_spec.rb @@ -15,7 +15,7 @@ RSpec.describe "bundle install with gems on multiple sources" do end end - context "with multiple toplevel sources" do + context "with multiple toplevel sources", :bundler => "< 2" do let(:repo3_rack_version) { "1.0.0" } before do @@ -27,10 +27,15 @@ RSpec.describe "bundle install with gems on multiple sources" do G end - it "warns about ambiguous gems, but installs anyway, prioritizing sources last to first", :bundler => "< 2" do + xit "shows a deprecation" do bundle :install expect(err).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") + end + + it "warns about ambiguous gems, but installs anyway, prioritizing sources last to first" do + bundle :install + expect(err).to include("Warning: the gem 'rack' was found in multiple sources.") expect(err).to include(normalize_uri_file("Installed from: file://localhost#{gem_repo1}")) expect(the_bundle).to include_gems("rack-obama 1.0.0", "rack 1.0.0", :source => "remote1") @@ -44,7 +49,7 @@ RSpec.describe "bundle install with gems on multiple sources" do end end - context "when different versions of the same gem are in multiple sources" do + context "when different versions of the same gem are in multiple sources", :bundler => "< 2" do let(:repo3_rack_version) { "1.2" } before do @@ -58,8 +63,11 @@ RSpec.describe "bundle install with gems on multiple sources" do bundle :install end - it "warns about ambiguous gems, but installs anyway", :bundler => "< 2" do + xit "shows a deprecation" do expect(err).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") + end + + it "warns about ambiguous gems, but installs anyway" do expect(err).to include("Warning: the gem 'rack' was found in multiple sources.") expect(err).to include(normalize_uri_file("Installed from: file://localhost#{gem_repo1}")) expect(the_bundle).to include_gems("rack-obama 1.0.0", "rack 1.0.0", :source => "remote1") @@ -235,7 +243,7 @@ RSpec.describe "bundle install with gems on multiple sources" do end end - context "and in yet another source" do + context "and in yet another source", :bundler => "< 2" do before do gemfile <<-G source "file://localhost#{gem_repo1}" @@ -248,15 +256,18 @@ RSpec.describe "bundle install with gems on multiple sources" do bundle :install end - it "installs from the other source and warns about ambiguous gems", :bundler => "< 2" do + xit "shows a deprecation" do expect(err).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") + end + + it "installs from the other source and warns about ambiguous gems" do expect(err).to include("Warning: the gem 'rack' was found in multiple sources.") expect(err).to include(normalize_uri_file("Installed from: file://localhost#{gem_repo2}")) expect(the_bundle).to include_gems("depends_on_rack 1.0.1", "rack 1.0.0") end end - context "and only the dependency is pinned" do + context "and only the dependency is pinned", :bundler => "< 2" do before do # need this to be broken to check for correct source ordering build_repo gem_repo2 do @@ -274,7 +285,7 @@ RSpec.describe "bundle install with gems on multiple sources" do G end - it "installs the dependency from the pinned source without warning", :bundler => "< 2" do + it "installs the dependency from the pinned source without warning" do bundle :install expect(err).not_to include("Warning: the gem 'rack' was found in multiple sources.") -- cgit v1.2.1