Skip to content

Commit

Permalink
Add skip_initialize_http_client to README example
Browse files Browse the repository at this point in the history
  • Loading branch information
feynmanliang committed May 3, 2023
1 parent c3d5dc1 commit b1254e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,11 @@ Supposing you are using [mox](https://github.com/dashbitco/mox), you can do some
```elixir
# in test_helper.exs
Mox.defmock(HTTPClientMock, for: Snap.HTTPClient)
Mox.stub(HTTPClientMock, :child_spec, fn _config -> :skip end)

# in config/test.exs
config :my_app, MyApp.Cluster, http_client_adapter: HTTPClientMock
config :my_app, MyApp.Cluster,
http_client_adapter: HTTPClientMock,
skip_initialize_http_client: true

# in a test file
Mox.expect(HTTPClientMock, :request, fn _cluster, _method, _url, _headers, _body, _opts
Expand Down

0 comments on commit b1254e2

Please sign in to comment.