summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-02-27 09:55:19 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-02-28 16:41:23 +0100
commit280307575c8a6ba550469498fcf1c7a91ae88026 (patch)
tree67e07c1249f56035f72829800b9cad3a7722f475
parentc425c5cd2b987a5b4c2c397b5308618241dcacbd (diff)
downloadbundler-fix_deprecation_specs.tar.gz
Split (and skip) specs about multiple source deprecationfix_deprecation_specs
I'll get to this on a separate PR.
-rw-r--r--spec/install/gemfile/sources_spec.rb27
1 files 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.")