You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In webmock 3.24.0, stub_request(method,uri) no longer accepts Addressable::URI objects.
let(:uri)doAddressable::URI.new(scheme: 'http',host: host,port: port,path: path)endit"must send a request with the given method and path to the host and return an Net::HTTPResponse object"dostub_request(method,uri)expect(subject.request(method,uri)).tobe_kind_of(Net::HTTPResponse)expect(WebMock).tohave_requested(method,uri)end
Failure/Error: stub_request(method,uri)
ArgumentError:
URI should be a String, Regexp, Addressable::Template or a callable object. Got: Addressable::URI
# /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.3.0/gems/webmock-3.24.0/lib/webmock/request_pattern.rb:92:in `create_uri_pattern'
# /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.3.0/gems/webmock-3.24.0/lib/webmock/request_pattern.rb:21:in `initialize'
# /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.3.0/gems/webmock-3.24.0/lib/webmock/request_stub.rb:9:in `new'
# /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.3.0/gems/webmock-3.24.0/lib/webmock/request_stub.rb:9:in `initialize'
# /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.3.0/gems/webmock-3.24.0/lib/webmock/api.rb:9:in `new'
# /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.3.0/gems/webmock-3.24.0/lib/webmock/api.rb:9:in `stub_request'
This previously worked with webmock 3.23.1.
The text was updated successfully, but these errors were encountered:
postmodern
changed the title
stub_request no longer accepts Addressable::URIstub_request no longer accepts Addressable::URI in webmock 3.24.0
Nov 19, 2024
postmodern
added a commit
to ronin-rb/ronin-support
that referenced
this issue
Nov 19, 2024
In webmock 3.24.0,
stub_request(method,uri)
no longer acceptsAddressable::URI
objects.This previously worked with webmock 3.23.1.
The text was updated successfully, but these errors were encountered: