Webmock: undefined method `reset_executed_requests!' for WebMock:Module in rspec test

Created on 24 Oct 2018  ·  5Comments  ·  Source: bblimke/webmock

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!

Most helpful comment

Sorry, I will check it!

All 5 comments

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bootstraponline picture bootstraponline  ·  18Comments

dnesteryuk picture dnesteryuk  ·  6Comments

Watson1978 picture Watson1978  ·  4Comments

Morred picture Morred  ·  14Comments

leifg picture leifg  ·  19Comments