Skip to content

Commit

Permalink
Work around webmock 3.24.0 / Addressable::URI regression issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Dec 7, 2024
1 parent 82bc391 commit 7caa17a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
5 changes: 3 additions & 2 deletions spec/network/http_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7caa17a

Please sign in to comment.