Skip to content

Commit

Permalink
fix typo (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
ipreferlinux committed Apr 23, 2021
1 parent 6a15fe9 commit 0ec67de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.md
Expand Up @@ -1512,7 +1512,7 @@ So far, we've only made assertions about the outgoing request. Clients are also

We use `ghttp.RespondWith` to specify the response return by the server. In this case we're passing back a status code of `200` (`http.StatusOK`) and a pile of JSON. We then assert, in the test, that the client succeeds and returns the correct set of sprockets.

The fact that details of the JSON encoding are bleeding into this test is somewhat unfortunate, and there's a lot of repetition going on. `ghttp` provides a `RepondWithJSONEncoded` handler that accepts an arbitrary object and JSON encodes it for you. Here's a cleaner test:
The fact that details of the JSON encoding are bleeding into this test is somewhat unfortunate, and there's a lot of repetition going on. `ghttp` provides a `RespondWithJSONEncoded` handler that accepts an arbitrary object and JSON encodes it for you. Here's a cleaner test:

```go
Describe("The sprockets client", func() {
Expand Down

0 comments on commit 0ec67de

Please sign in to comment.