Getting started |
|
---|---|
Use 'httptest2' in your tests |
|
Test contexts |
|
Serve a mock API from files |
|
Use or create mock files depending on their existence |
|
Make all HTTP requests raise an error |
|
Set an alternate directory for mock API fixtures |
|
Recording and redacting responses |
|
Record API responses as mock files |
|
Remove sensitive content from HTTP responses |
|
Find and replace within a response object |
|
Set a response redactor |
|
Expectations |
|
|
Expectations for mocked HTTP requests |
Test that an HTTP request is made with a header |
|
Vignettes |
|
Set mocking/capturing state for a vignette |
|
Handle a change of server state |