I haven't found how to do this in the examples, so I'm filing this as a documentation issue.
How do I stub a request to a particular URL ("example.com/a/b"), not caring about the query string?
If I only stub the URL, it doesn't hit the stub.
How about regular expression?
https://github.com/bblimke/webmock#matching-uris-using-regular-expressions
That's how I worked around it. I thought there'd be a first class way to do this, okay then
@joallard alternatively .with(query: hash_including({})
but it's also a workaround.
WebMock treats query as part of the url (well, it is), therefore if it's empty, it expects it to be empty.
Perhaps that should be changed in the future.
Thanks @bblimke !
Most helpful comment
@joallard alternatively
.with(query: hash_including({})
but it's also a workaround.WebMock treats query as part of the url (well, it is), therefore if it's empty, it expects it to be empty.
Perhaps that should be changed in the future.