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

dnesteryuk picture dnesteryuk  路  6Comments

bootstraponline picture bootstraponline  路  18Comments

RKushnir picture RKushnir  路  14Comments

Morred picture Morred  路  14Comments

emarthinsen picture emarthinsen  路  8Comments