From 5758c6487de1cdc6df33dfabdd59de23d3fd55f4 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 31 Jan 2022 09:42:40 +0900 Subject: Expect to receive a non-keywords hash `RSpec::Mocks::ArgumentListMatcher#args_match?` fails when a non-keywords hash is passed while a keyword hash is expected. This is a change in `rspec-mocks` 3.10.3, so we need to adapt to it. --- spec/bundler/bundler/rubygems_integration_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 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 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 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) -- cgit v1.2.3