mirror of
https://github.com/lostisland/faraday.git
synced 2025-11-27 00:04:03 -05:00
Describe clearing cached stubs
This was the solution proposed in https://github.com/lostisland/faraday/issues/1041
This commit is contained in:
parent
940e01ce38
commit
cccc145e2f
@ -72,6 +72,14 @@ verify the order or count of any stub.
|
||||
stubs.verify_stubbed_calls
|
||||
```
|
||||
|
||||
After the test case is completed (possibly in an `after` hook), you should clear
|
||||
the default connection to prevent it from being cached between different tests.
|
||||
This allows for each test to have its own set of stubs
|
||||
|
||||
```ruby
|
||||
Faraday.default_connection = nil
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
Working [RSpec] and [test/unit] examples for a fictional JSON API client are
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user