webmock
webmock copied to clipboard
undefined method `reset_executed_requests!' for WebMock:Module in rspec test
Following the documentation, I've added require 'webmock/rspec'
to my helper. But, when trying to use WebMock.reset_executed_requests!
, I get the error message in the title.
Any help would be appreciated!
But thankfully this works fine WebMock::RequestRegistry.instance.reset!
Taken from: https://github.com/bblimke/webmock/blob/d8686502442d9830dcccd24a1120ac08413d857a/lib/webmock/api.rb#L70
@wgordon17 you're right. thank you for pointing that out!
@bblimke Ok, so this is expected? Is it always expected, or just in the way I import for rspec
?
That is not expected. It's a bug.
Sorry, I will check it!