Skip to content

Commit 6242c5c

Browse files
authored
Update README.md (#128)
There is no documentation to unregister registered mocks, while it is possible to unregister them with `Mocker.removeAll()`.
1 parent bbeb9c5 commit 6242c5c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Mocker is a library written in Swift which makes it possible to mock data reques
3030
- [Redirect responses](#redirect-responses)
3131
- [Ignoring URLs](#ignoring-urls)
3232
- [Mock callbacks](#mock-callbacks)
33+
- [Unregister Mocks](#unregister-mocks)
34+
- [Clear all registered mocks](#clear-all-registered-mocks)
3335
- [Communication](#communication)
3436
- [Installation](#installation)
3537
- [Release Notes](#release-notes)
@@ -269,6 +271,14 @@ URLSession.shared.dataTask(with: URLRequest(url: url)).resume()
269271
wait(for: [requestExpectation, completionExpectation], timeout: 2.0)
270272
```
271273

274+
### Unregister Mocks
275+
##### Clear all registered mocks
276+
You can clear all registered mocks:
277+
278+
```swift
279+
Mocker.removeAll()
280+
```
281+
272282
## Communication
273283

274284
- If you **found a bug**, open an issue.

0 commit comments

Comments
 (0)