summaryrefslogtreecommitdiff
path: root/spec/install/gemfile/sources_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/install/gemfile/sources_spec.rb')
-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.")