We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
require 'fakeweb' FakeWeb.allow_net_connect = false reg = /http:\/\/a\.com\?a=1/ uri=URI("http://a.com?a=1") FakeWeb.register_uri(:get, reg, body: 'ok') Net::HTTP.get(uri)
results in a FakeWeb::NetConnectNotAllowedError (Real HTTP connections are disabled. Unregistered request: GET http://a.com/?a=1)
FakeWeb::NetConnectNotAllowedError (Real HTTP connections are disabled. Unregistered request: GET http://a.com/?a=1)
But uri.to_s.match reg gives a match
uri.to_s.match reg
Registering the same url without regular expression also works
FakeWeb.clean_registry uri=URI("http://a.com?a=1") FakeWeb.register_uri(:get, uri.to_s, body: 'ok') Net::HTTP.get(uri)
With a regular expression you need to add the trailing slash after the hostname to get a good result
FakeWeb.clean_registry reg = /http:\/\/a\.com\/\?a=1/ uri=URI("http://a.com?a=1") FakeWeb.register_uri(:get, reg, body: 'ok') Net::HTTP.get(uri)
Seems inconsistent to me
The text was updated successfully, but these errors were encountered:
No branches or pull requests
results in a
FakeWeb::NetConnectNotAllowedError (Real HTTP connections are disabled. Unregistered request: GET http://a.com/?a=1)
But
uri.to_s.match reg
gives a matchRegistering the same url without regular expression also works
With a regular expression you need to add the trailing slash after the hostname to get a good result
Seems inconsistent to me
The text was updated successfully, but these errors were encountered: