You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rubygem-webmock/rubygem-webmock-3.14.0-Fixu...

37 lines
1.5 KiB

From fb8bf400e5a1e56f66318b6ea5a8b64894b05596 Mon Sep 17 00:00:00 2001
From: ojab <ojab@ojab.ru>
Date: Thu, 10 Feb 2022 14:32:49 +0000
Subject: [PATCH] Fixup failures with latest RSpec
---
spec/unit/request_signature_spec.rb | 2 +-
spec/unit/response_spec.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/spec/unit/request_signature_spec.rb b/spec/unit/request_signature_spec.rb
index 8b9e1990..02a5ec17 100644
--- a/spec/unit/request_signature_spec.rb
+++ b/spec/unit/request_signature_spec.rb
@@ -18,7 +18,7 @@
end
it "assigns normalized headers" do
- expect(WebMock::Util::Headers).to receive(:normalize_headers).with('A' => 'a').and_return('B' => 'b')
+ allow(WebMock::Util::Headers).to receive(:normalize_headers).with({'A' => 'a'}.freeze).and_return('B' => 'b')
expect(
WebMock::RequestSignature.new(:get, "www.example.com", headers: {'A' => 'a'}).headers
).to eq({'B' => 'b'})
diff --git a/spec/unit/response_spec.rb b/spec/unit/response_spec.rb
index f02cb7c1..4c3ae38d 100644
--- a/spec/unit/response_spec.rb
+++ b/spec/unit/response_spec.rb
@@ -31,7 +31,7 @@
end
it "should report normalized headers" do
- expect(WebMock::Util::Headers).to receive(:normalize_headers).with('A' => 'a').and_return('B' => 'b')
+ allow(WebMock::Util::Headers).to receive(:normalize_headers).with({'A' => 'a'}.freeze).and_return('B' => 'b')
@response = WebMock::Response.new(headers: {'A' => 'a'})
expect(@response.headers).to eq({'B' => 'b'})
end