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

ruby-changes:71163

From: nagachika <ko1@a...>
Date: Sat, 12 Feb 2022 17:27:52 +0900 (JST)
Subject: [ruby-changes:71163] ea04e3fff7 (ruby_3_0): Fix bundler test failures.

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

From ea04e3fff7401cbf0a45f39351c7eb9c9dd6030e Mon Sep 17 00:00:00 2001
From: nagachika <nagachika@r...>
Date: Sat, 12 Feb 2022 16:55:40 +0900
Subject: Fix bundler test failures.

These failures are caused by the incompatibility in keyword argument
treatment in rspec-mocks.
I fix the expectations in the bundler/rubygems_integration_spec.rb.
These tests are not touched in the master branch.
It seems that the following patch also fix the failures.
But I believe the expectations in these tests are wrong. We should pass a Hash literal explicitly.

--- a/common.mk
+++ b/common.mk
@@ -1365,7 +1365,7 @@ yes-test-bundler-precheck: main https://github.com/ruby/ruby/blob/trunk/common.mk#L1365
 no-test-bundler-prepare: no-test-bundler-precheck
 yes-test-bundler-prepare: yes-test-bundler-precheck
        $(XRUBY) -C "$(srcdir)" bin/gem install --no-document \
-               --install-dir .bundle --conservative "rspec:~> 3.8" "rake:~> 13.0" "parallel_tests:~> 2.29"
+               --install-dir .bundle --conservative "rspec-core:= 3.10.1" "rspec-expectations:= 3.10.1" "rspec-mocks:= 3.10.2" "rake:~> 13.0" "parallel_tests:~> 2.29"

 RSPECOPTS =
 BUNDLER_SPECS =
---
 spec/bundler/bundler/rubygems_integration_spec.rb | 4 ++--
 version.h                                         | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/spec/bundler/bundler/rubygems_integration_spec.rb b/spec/bundler/bundler/rubygems_integration_spec.rb
index 94abf70ddd..7557c806fe 100644
--- a/spec/bundler/bundler/rubygems_integration_spec.rb
+++ b/spec/bundler/bundler/rubygems_integration_spec.rb
@@ -54,7 +54,7 @@ RSpec.describe Bundler::RubygemsIntegration do https://github.com/ruby/ruby/blob/trunk/spec/bundler/bundler/rubygems_integration_spec.rb#L54
 
     it "successfully downloads gem with retries" do
       expect(Bundler.rubygems).to receive(:gem_remote_fetcher).and_return(fetcher)
-      expect(fetcher).to receive(:headers=).with("X-Gemfile-Source" => "https://foo.bar")
+      expect(fetcher).to receive(:headers=).with({ "X-Gemfile-Source" => "https://foo.bar" })
       expect(Bundler::Retry).to receive(:new).with("download gem from #{uri}/").
         and_return(bundler_retry)
       expect(bundler_retry).to receive(:attempts).and_yield
@@ -76,7 +76,7 @@ RSpec.describe Bundler::RubygemsIntegration do https://github.com/ruby/ruby/blob/trunk/spec/bundler/bundler/rubygems_integration_spec.rb#L76
 
       it "sets the 'X-Gemfile-Source' header containing the original source" do
         expect(Bundler.rubygems).to receive(:gem_remote_fetcher).twice.and_return(fetcher)
-        expect(fetcher).to receive(:headers=).with("X-Gemfile-Source" => "http://zombo.com").twice
+        expect(fetcher).to receive(:headers=).with({ "X-Gemfile-Source" => "http://zombo.com" }).twice
         expect(fetcher).to receive(:fetch_path).with(uri + "specs.4.8.gz").and_return(specs_response)
         expect(fetcher).to receive(:fetch_path).with(uri + "prerelease_specs.4.8.gz").and_return(prerelease_specs_response)
         result = Bundler.rubygems.fetch_all_remote_specs(remote_with_mirror)
diff --git a/version.h b/version.h
index f74699f971..0a27f7df31 100644
--- a/version.h
+++ b/version.h
@@ -12,7 +12,7 @@ https://github.com/ruby/ruby/blob/trunk/version.h#L12
 # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
 #define RUBY_VERSION_TEENY 4
 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
-#define RUBY_PATCHLEVEL 165
+#define RUBY_PATCHLEVEL 166
 
 #define RUBY_RELEASE_YEAR 2022
 #define RUBY_RELEASE_MONTH 2
-- 
cgit v1.2.1


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

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