1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[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
This commit is contained in:
David Rodríguez 2020-05-29 13:06:07 +02:00 committed by Hiroshi SHIBATA
parent 5c924f597f
commit f02f19d62f
Notes: git 2020-06-05 07:33:57 +09:00
2 changed files with 16 additions and 13 deletions

View file

@ -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

View file

@ -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