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
It would be great if we had the ability to unregister a single URI. The use case for this would be in specs, where we would ideally want fake URIs to only last the duration of each example, to decrease dependency on the order in which tests are run. For example:
context"with a FakeWeb URI"dobeforedoFakeWeb.register_uri:any,%r{somerequest.com}# ...endafterdoFakeWeb.unregister_uri%r{somerequest.com}endscenario"responds to somerequest.com"doexpect(Net::HTTP).toreceive(:get).with(URI.parse"http://somerequest.com/").and_return(anything)endendcontext"without a FakeWeb URI"doscenario"doesn't respond to somerequest.com"doexpect(Net::HTTP).toreceive(:get).with(URI.parse"http://somerequest.com/").and_return(nil)# or whateverendend
The text was updated successfully, but these errors were encountered:
It would be great if we had the ability to unregister a single URI. The use case for this would be in specs, where we would ideally want fake URIs to only last the duration of each example, to decrease dependency on the order in which tests are run. For example:
The text was updated successfully, but these errors were encountered: