Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API to reset registry requests #761

Merged
merged 3 commits into from Jun 7, 2018

Conversation

oliakremmyda
Copy link
Collaborator

Fixes #760

@oliakremmyda oliakremmyda requested a review from bblimke June 5, 2018 07:12
README.md Outdated
stub_get = stub_request(:get, "www.example.com")
Net::HTTP.get('www.example.com', '/')

WebMock::RequestRegistry.instance.times_executed(stub_get.request_pattern) # => 1
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WebMock::RequestRegistry.instance.times_executed is not part of the API.

perhaps it's better to show examples with expect(stub_get).to have_been_requested.times(1)
and then expect(stub_get).not_to have_been_requested ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I will change this!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have moved it in the stubs section to be more consistent.

They have changed their site to return an empty response if Accept is not specified.
Fixes the tests that depend on those responses.
Copy link
Owner

@bblimke bblimke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

@bblimke bblimke merged commit d868650 into bblimke:master Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants