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
I currently use the Webmock 3.0.1 for vcr to stub external request. The issue is that the 2 different url requests return the same response so that the test is failed.
When vcr is not used, the test is passed. The requests are not in the same spec/scenario.
As i look at the code, Webmock implements class called Curl::WebMockCurlEasy which inherited the Curl::Easy. Although it does not override the reset method, somehow it does not clear out the @body_str of the previous request. The reset of Curl::Easy does clear out the variable. One notice is that the Curl::Easy instance is the same in the two requests.
Because the reset in the library is in C code so i can't go further.
If i apply the patch to clear out the body_str, it works well.
class Curl::WebMockCurlEasy
def reset
instance_variable_set('@body_str', nil)
super
end
end
The text was updated successfully, but these errors were encountered:
I currently use the Webmock
3.0.1
forvcr
to stub external request. The issue is that the 2 different url requests return the same response so that the test is failed.When
vcr
is not used, the test is passed. The requests are not in the same spec/scenario.As i look at the code,
Webmock
implements class calledCurl::WebMockCurlEasy
which inherited theCurl::Easy
. Although it does not override thereset
method, somehow it does not clear out the@body_str
of the previous request. Thereset
ofCurl::Easy
does clear out the variable. One notice is that theCurl::Easy
instance is the same in the two requests.Because the
reset
in the library is in C code so i can't go further.If i apply the patch to clear out the
body_str
, it works well.The text was updated successfully, but these errors were encountered: