New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use the same url twice #1052
Comments
@rdptz can you please provide the sample code to reproduce the problem? your example doesn't have any code that executes the request. |
Hi, that is the sample code. You cannot stub two requests with the same url. The second spec raises: WebMock::NetConnectNotAllowedError: Real HTTP connections are disabled. Unregistered request: POST http://localhost/foobar with body 'BAR' with headers {'Connection'=>'close', 'Content-Type'=>'application/xml', 'Host'=>'localhost', 'User-Agent'=>'http.rb/5.1.1'} Yes I have Everything works fine as long as I do not stub 2 requests with the same url. |
I have the same trouble now... |
Sorry, it was my mistake. It works for me. |
It seems WM doesn't support stubbing the same url twice in the same spec. How can this be possibile?
If you run the single "its" below, everything is fine, if you run the whole specs the second one always fails with:
WebMock::NetConnectNotAllowedError: Real HTTP connections are disabled. Unregistered request: POST http://localhost/foobar with body 'BAR' with headers {'Connection'=>'close', 'Content-Type'=>'application/xml', 'Host'=>'localhost', 'User-Agent'=>'http.rb/5.1.1'}
thanks,
The text was updated successfully, but these errors were encountered: