[前][次][番号順一覧][スレッド一覧]

ruby-changes:69709

From: David <ko1@a...>
Date: Fri, 12 Nov 2021 06:05:22 +0900 (JST)
Subject: [ruby-changes:69709] 4736dec58b (master): [rubygems/rubygems] Remove `gemfile_should_be` helper as well

https://git.ruby-lang.org/ruby.git/commit/?id=4736dec58b

From 4736dec58ba81283c4351a2d682a4be432b0c28d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Thu, 11 Nov 2021 20:28:47 +0100
Subject: [rubygems/rubygems] Remove `gemfile_should_be` helper as well

https://github.com/rubygems/rubygems/commit/79f3c00caa
---
 spec/bundler/commands/remove_spec.rb | 50 ++++++++++++++++++------------------
 spec/bundler/support/matchers.rb     |  4 ---
 2 files changed, 25 insertions(+), 29 deletions(-)

diff --git a/spec/bundler/commands/remove_spec.rb b/spec/bundler/commands/remove_spec.rb
index 9e2586bae63..70dc09c9b67 100644
--- a/spec/bundler/commands/remove_spec.rb
+++ b/spec/bundler/commands/remove_spec.rb
@@ -41,7 +41,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L41
 
         expect(out).to include("rack was removed.")
         expect(the_bundle).to_not include_gems "rack"
-        gemfile_should_be <<-G
+        expect(gemfile).to eq <<~G
           source "#{file_uri_for(gem_repo1)}"
         G
       end
@@ -61,7 +61,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L61
           bundle "remove rack"
 
           expect(out).to include("rack was removed.")
-          gemfile_should_be <<-G
+          expect(gemfile).to eq <<~G
             source '#{file_uri_for(gem_repo1)}'
 
             gem 'git'
@@ -98,7 +98,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L98
 
         expect(out).to include("rack was removed.")
         expect(out).to include("rails was removed.")
-        gemfile_should_be <<-G
+        expect(gemfile).to eq <<~G
         source "#{file_uri_for(gem_repo1)}"
         G
       end
@@ -117,7 +117,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L117
         bundle "remove rails rack minitest", :raise_on_error => false
 
         expect(err).to include("`rack` is not specified in #{bundled_app_gemfile} so it could not be removed.")
-        gemfile_should_be <<-G
+        expect(gemfile).to eq <<~G
           source "#{file_uri_for(gem_repo1)}"
 
           gem "rails"
@@ -139,7 +139,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L139
       bundle "remove rack"
 
       expect(out).to include("rack was removed.")
-      gemfile_should_be <<-G
+      expect(gemfile).to eq <<~G
         source "#{file_uri_for(gem_repo1)}"
       G
     end
@@ -159,7 +159,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L159
         bundle "remove rspec"
 
         expect(out).to include("rspec was removed.")
-        gemfile_should_be <<-G
+        expect(gemfile).to eq <<~G
           source "#{file_uri_for(gem_repo1)}"
         G
       end
@@ -179,7 +179,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L179
         bundle "remove rack"
 
         expect(out).to include("rack was removed.")
-        gemfile_should_be <<-G
+        expect(gemfile).to eq <<~G
           source "#{file_uri_for(gem_repo1)}"
 
           group :test do
@@ -205,7 +205,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L205
         bundle "remove rspec"
 
         expect(out).to include("rspec was removed.")
-        gemfile_should_be <<-G
+        expect(gemfile).to eq <<~G
           source "#{file_uri_for(gem_repo1)}"
         G
       end
@@ -224,7 +224,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L224
         bundle "remove rspec"
 
         expect(out).to include("rspec was removed.")
-        gemfile_should_be <<-G
+        expect(gemfile).to eq <<~G
           source "#{file_uri_for(gem_repo1)}"
         G
       end
@@ -247,7 +247,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L247
         bundle "remove rspec"
 
         expect(out).to include("rspec was removed.")
-        gemfile_should_be <<-G
+        expect(gemfile).to eq <<~G
           source "#{file_uri_for(gem_repo1)}"
         G
       end
@@ -270,7 +270,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L270
         bundle "remove rspec"
 
         expect(out).to include("rspec was removed.")
-        gemfile_should_be <<-G
+        expect(gemfile).to eq <<~G
           source "#{file_uri_for(gem_repo1)}"
         G
       end
@@ -293,7 +293,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L293
         bundle "remove rspec"
 
         expect(out).to include("rspec was removed.")
-        gemfile_should_be <<-G
+        expect(gemfile).to eq <<~G
           source "#{file_uri_for(gem_repo1)}"
 
           group :test do
@@ -320,7 +320,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L320
         bundle "remove rspec"
 
         expect(out).to include("rspec was removed.")
-        gemfile_should_be <<-G
+        expect(gemfile).to eq <<~G
           source "#{file_uri_for(gem_repo1)}"
 
           group :test do
@@ -344,7 +344,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L344
         bundle "remove rails", :raise_on_error => false
 
         expect(err).to include("Gems could not be removed. rack (>= 0) would also have been removed.")
-        gemfile_should_be <<-G
+        expect(gemfile).to eq <<~G
           source "#{file_uri_for(gem_repo1)}"
           gem "rack"; gem "rails"
         G
@@ -366,7 +366,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L366
         expect(out).to include("rails was removed.")
         expect(out).to include("minitest was removed.")
         expect(out).to include("rack, rspec could not be removed.")
-        gemfile_should_be <<-G
+        expect(gemfile).to eq <<~G
           source "#{file_uri_for(gem_repo1)}"
           gem"rack"
           gem"rspec"
@@ -398,7 +398,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L398
       bundle "remove rspec"
 
       expect(out).to include("rspec was removed.")
-      gemfile_should_be <<-G
+      expect(gemfile).to eq <<~G
         source "#{file_uri_for(gem_repo1)}"
 
         gem "rack"
@@ -482,7 +482,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L482
 
         expect(out).to include("rack was removed.")
         expect(err).to include("`rack` is not specified in #{bundled_app("Gemfile-other")} so it could not be removed.")
-        gemfile_should_be <<-G
+        expect(gemfile).to eq <<~G
           source "#{file_uri_for(gem_repo1)}"
 
           eval_gemfile "Gemfile-other"
@@ -507,7 +507,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L507
 
         expect(out).to include("rack was removed.")
         expect(err).to include("Gems could not be removed. rails (>= 0) would also have been removed.")
-        gemfile_should_be <<-G
+        expect(gemfile).to eq <<~G
           source "#{file_uri_for(gem_repo1)}"
 
           eval_gemfile "Gemfile-other"
@@ -532,7 +532,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L532
 
         expect(err).to include("Gems could not be removed. rails (>= 0) would also have been removed.")
         expect(bundled_app("Gemfile-other").read).to include("gem \"rack\"")
-        gemfile_should_be <<-G
+        expect(gemfile).to eq <<~G
           source "#{file_uri_for(gem_repo1)}"
 
           eval_gemfile "Gemfile-other"
@@ -575,7 +575,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L575
       bundle "remove rack"
 
       expect(out).to include("rack was removed.")
-      gemfile_should_be <<-G
+      expect(gemfile).to eq <<~G
         source "#{file_uri_for(gem_repo1)}"
       G
     end
@@ -594,7 +594,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L594
       bundle "remove rack"
 
       expect(out).to include("rack was removed.")
-      gemfile_should_be <<-G
+      expect(gemfile).to eq <<~G
         source "#{file_uri_for(gem_repo1)}"
       G
     end
@@ -631,7 +631,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L631
         bundle "remove rack"
 
         expect(out).to include("rack was removed.")
-        gemfile_should_be <<-G
+        expect(gemfile).to eq <<~G
           source "#{file_uri_for(gem_repo1)}"
 
           # gem "rack" might be used in the future
@@ -650,7 +650,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L650
         bundle "remove rack"
 
         expect(out).to include("rack was removed.")
-        gemfile_should_be <<-G
+        expect(gemfile).to eq <<~G
           source "#{file_uri_for(gem_repo1)}"
         G
       end
@@ -669,7 +669,7 @@ RSpec.describe "bundle remove" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/remove_spec.rb#L669
 
         expect(out).to_not include("puma was removed.")
         expect(out).to include("rack was removed.")
-        gemfile_should_be <<-G
+        expect(gemfile).to eq <<~G
           source "#{file_uri_fo (... truncated)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]