Skip to content

Commit

Permalink
Update README.md (#128)
Browse files Browse the repository at this point in the history
There is no documentation to unregister registered mocks, while it is possible to unregister them with `Mocker.removeAll()`.
  • Loading branch information
farrasdoko authored Aug 11, 2022
1 parent bbeb9c5 commit 6242c5c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Mocker is a library written in Swift which makes it possible to mock data reques
- [Redirect responses](#redirect-responses)
- [Ignoring URLs](#ignoring-urls)
- [Mock callbacks](#mock-callbacks)
- [Unregister Mocks](#unregister-mocks)
- [Clear all registered mocks](#clear-all-registered-mocks)
- [Communication](#communication)
- [Installation](#installation)
- [Release Notes](#release-notes)
Expand Down Expand Up @@ -269,6 +271,14 @@ URLSession.shared.dataTask(with: URLRequest(url: url)).resume()
wait(for: [requestExpectation, completionExpectation], timeout: 2.0)
```

### Unregister Mocks
##### Clear all registered mocks
You can clear all registered mocks:

```swift
Mocker.removeAll()
```

## Communication

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

0 comments on commit 6242c5c

Please sign in to comment.