summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-01-31 09:42:40 +0900
committernagachika <nagachika@ruby-lang.org>2022-04-12 14:07:25 +0900
commit5758c6487de1cdc6df33dfabdd59de23d3fd55f4 (patch)
tree6cbf868adfdf622836b2d084358496c0d4902cf9
parentcdec8a29c5e2e3fedc2e7726d409121d5e2890da (diff)
downloadruby-5758c6487de1cdc6df33dfabdd59de23d3fd55f4.tar.gz
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.
-rw-r--r--spec/bundler/bundler/rubygems_integration_spec.rb4
1 files 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)