summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2024-11-18 14:03:37 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2024-11-26 15:11:05 +0900
commitd63eeafe690712bde051983f766de1008133f054 (patch)
treeb61a91ce1611a45fd6da793fd23022c5da31bc0c
parent6386d49f9e2443db8ecb59b9be7ce5b2be9f1cd3 (diff)
[rubygems/rubygems] Remove unnecessary `let` and nesting
https://github.com/rubygems/rubygems/commit/c519830d4d
-rw-r--r--spec/bundler/install/yanked_spec.rb24
1 files changed, 8 insertions, 16 deletions
diff --git a/spec/bundler/install/yanked_spec.rb b/spec/bundler/install/yanked_spec.rb
index b2edd11acd..ef9eae57fc 100644
--- a/spec/bundler/install/yanked_spec.rb
+++ b/spec/bundler/install/yanked_spec.rb
@@ -50,14 +50,14 @@ RSpec.context "when installing a bundle that includes yanked gems" do
end
gemfile <<~G
- source "#{source_uri}"
+ source "https://gem.repo4"
gem "foo", "1.0.1"
gem "actiontext", "6.1.6"
G
lockfile <<~L
GEM
- remote: #{source_uri}/
+ remote: https://gem.repo4/
specs:
actiontext (6.1.6)
nokogiri (>= 1.8)
@@ -76,24 +76,16 @@ RSpec.context "when installing a bundle that includes yanked gems" do
L
end
- context "and the old index is used" do
- let(:source_uri) { "https://gem.repo4" }
+ it "reports the yanked gem properly when the old index is used" do
+ bundle "install", artifice: "endpoint", raise_on_error: false, verbose: true
- it "reports the yanked gem properly" do
- bundle "install", artifice: "endpoint", raise_on_error: false, verbose: true
-
- expect(err).to include("Your bundle is locked to nokogiri (1.13.8-#{Bundler.local_platform})")
- end
+ expect(err).to include("Your bundle is locked to nokogiri (1.13.8-#{Bundler.local_platform})")
end
- context "and the compact index API is used" do
- let(:source_uri) { "https://gem.repo4" }
+ it "reports the yanked gem properly when the compact index API is used" do
+ bundle "install", artifice: "compact_index", raise_on_error: false
- it "reports the yanked gem properly" do
- bundle "install", artifice: "compact_index", raise_on_error: false
-
- expect(err).to include("Your bundle is locked to nokogiri (1.13.8-#{Bundler.local_platform})")
- end
+ expect(err).to include("Your bundle is locked to nokogiri (1.13.8-#{Bundler.local_platform})")
end
end