From 7caa17a6a0fd8c7913bd8312d85df3dc6ad8d049 Mon Sep 17 00:00:00 2001 From: Postmodern Date: Sat, 7 Dec 2024 15:35:23 -0800 Subject: [PATCH] Work around webmock 3.24.0 / `Addressable::URI` regression issue. * https://github.com/bblimke/webmock/issues/1082 --- Gemfile | 2 +- spec/network/http_spec.rb | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 135accece..6add36aed 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,7 @@ group :development do gem 'rake' gem 'rubygems-tasks', '~> 0.1' gem 'rspec', '~> 3.0' - gem 'webmock', '~> 3.0', '!= 3.24.0' + gem 'webmock', '~> 3.0' gem 'simplecov', '~> 0.18' gem 'kramdown', '~> 2.0' diff --git a/spec/network/http_spec.rb b/spec/network/http_spec.rb index 64170667d..c545a99cb 100644 --- a/spec/network/http_spec.rb +++ b/spec/network/http_spec.rb @@ -1373,11 +1373,12 @@ end it "must send a request with the given method and path to the host and return an Net::HTTPResponse object" do - stub_request(method,uri) + # NOTE: webmock 3.24.0 stopped accepting Addressable::URI values + stub_request(method,uri.to_s) expect(subject.request(method,uri)).to be_kind_of(Net::HTTPResponse) - expect(WebMock).to have_requested(method,uri) + expect(WebMock).to have_requested(method,uri.to_s) end end