summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-05-29 13:06:07 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-06-05 07:32:42 +0900
commitf02f19d62f70bc3b38ff9f2902f99e3bfefefa23 (patch)
tree91963bf499c2cfea2182995eaec328ccf7fa957e /spec
parent5c924f597f7d633543589de152d09011a3fc2d21 (diff)
[rubygems/rubygems] Rewrite dependency API specs to use new deployment mode
Some of them were passing "by chance" because they used a `bundle install` command that failed, but the assertion was using the result of the previous. Others were skipped on bundler 3. Now they all pass in all versions. https://github.com/rubygems/rubygems/commit/cedf611e11
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3184
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/install/gems/compact_index_spec.rb15
-rw-r--r--spec/bundler/install/gems/dependency_api_spec.rb14
2 files changed, 16 insertions, 13 deletions
diff --git a/spec/bundler/install/gems/compact_index_spec.rb b/spec/bundler/install/gems/compact_index_spec.rb
index 4760d135e6..b9ceefa929 100644
--- a/spec/bundler/install/gems/compact_index_spec.rb
+++ b/spec/bundler/install/gems/compact_index_spec.rb
@@ -73,7 +73,7 @@ RSpec.describe "compact index api" do
expect(the_bundle).to include_gems "net-sftp 1.1.1"
end
- it "should use the endpoint when using --deployment" do
+ it "should use the endpoint when using deployment mode" do
gemfile <<-G
source "#{source_uri}"
gem "rack"
@@ -103,7 +103,7 @@ RSpec.describe "compact index api" do
expect(the_bundle).to include_gems("rails 2.3.2")
end
- it "handles git dependencies that are in rubygems using --deployment" do
+ it "handles git dependencies that are in rubygems using deployment mode" do
build_git "foo" do |s|
s.executables = "foobar"
s.add_dependency "rails", "2.3.2"
@@ -116,12 +116,13 @@ RSpec.describe "compact index api" do
bundle! :install, :artifice => "compact_index"
- bundle "install --deployment", :artifice => "compact_index"
+ bundle "config --local deployment true"
+ bundle :install, :artifice => "compact_index"
expect(the_bundle).to include_gems("rails 2.3.2")
end
- it "doesn't fail if you only have a git gem with no deps when using --deployment" do
+ it "doesn't fail if you only have a git gem with no deps when using deployment mode" do
build_git "foo"
gemfile <<-G
source "#{source_uri}"
@@ -473,7 +474,7 @@ The checksum of /versions does not match the checksum provided by the server! So
expect(the_bundle).to include_gems "back_deps 1.0"
end
- it "fetches again when more dependencies are found in subsequent sources using --deployment with blocks" do
+ it "fetches again when more dependencies are found in subsequent sources using deployment mode with blocks" do
build_repo2 do
build_gem "back_deps" do |s|
s.add_dependency "foo"
@@ -489,8 +490,8 @@ The checksum of /versions does not match the checksum provided by the server! So
G
bundle! :install, :artifice => "compact_index_extra"
-
- bundle "install --deployment", :artifice => "compact_index_extra"
+ bundle "config --local deployment true"
+ bundle! :install, :artifice => "compact_index_extra"
expect(the_bundle).to include_gems "back_deps 1.0"
end
diff --git a/spec/bundler/install/gems/dependency_api_spec.rb b/spec/bundler/install/gems/dependency_api_spec.rb
index d1af4d7ed7..5b1beeba43 100644
--- a/spec/bundler/install/gems/dependency_api_spec.rb
+++ b/spec/bundler/install/gems/dependency_api_spec.rb
@@ -53,7 +53,7 @@ RSpec.describe "gemcutter's dependency API" do
expect(the_bundle).to include_gems "net-sftp 1.1.1"
end
- it "should use the endpoint when using --deployment" do
+ it "should use the endpoint when using deployment mode" do
gemfile <<-G
source "#{source_uri}"
gem "rack"
@@ -83,7 +83,7 @@ RSpec.describe "gemcutter's dependency API" do
expect(the_bundle).to include_gems("rails 2.3.2")
end
- it "handles git dependencies that are in rubygems using --deployment" do
+ it "handles git dependencies that are in rubygems using deployment mode" do
build_git "foo" do |s|
s.executables = "foobar"
s.add_dependency "rails", "2.3.2"
@@ -96,12 +96,13 @@ RSpec.describe "gemcutter's dependency API" do
bundle :install, :artifice => "endpoint"
- bundle "install --deployment", :artifice => "endpoint"
+ bundle "config --local deployment true"
+ bundle :install, :artifice => "endpoint"
expect(the_bundle).to include_gems("rails 2.3.2")
end
- it "doesn't fail if you only have a git gem with no deps when using --deployment" do
+ it "doesn't fail if you only have a git gem with no deps when using deployment mode" do
build_git "foo"
gemfile <<-G
source "#{source_uri}"
@@ -446,7 +447,7 @@ RSpec.describe "gemcutter's dependency API" do
expect(the_bundle).to include_gems "back_deps 1.0"
end
- it "fetches again when more dependencies are found in subsequent sources using --deployment with blocks" do
+ it "fetches again when more dependencies are found in subsequent sources using deployment mode with blocks" do
build_repo2 do
build_gem "back_deps" do |s|
s.add_dependency "foo"
@@ -463,7 +464,8 @@ RSpec.describe "gemcutter's dependency API" do
bundle :install, :artifice => "endpoint_extra"
- bundle "install --deployment", :artifice => "endpoint_extra"
+ bundle "config --local deployment true"
+ bundle! "install", :artifice => "endpoint_extra"
expect(the_bundle).to include_gems "back_deps 1.0"
end