webmock
webmock copied to clipboard
delete invalid uri like `127.0.0.1:3000/1234`
Versions:
webmock: 3.8.3 rspec: 3.5.4
Problem
ip address host which has no ports doesn't match request uri.
it "should match if Addressable::Template pattern that has ip address host without port matches request uri" do
signature = WebMock::RequestSignature.new(:get, "127.0.0.1/1234")
uri = Addressable::Template.new("127.0.0.1/{id}")
expect(WebMock::RequestPattern.new(:get, uri)).to match(signature)
end
Workaround
Delete invalid string in the results of #matches_with_variations?.