Skip to content

Creating mocks

Lazarus Lazaridis edited this page Nov 17, 2017 · 5 revisions

With DuckRails you can defined either static or dynamic mocks.

Static mocks

Mocks that always respond with the same body and headers.

Dynamic mocks

Mocks whose body and headers can dynamically change. This can be achieved by using either Embedded Ruby or Javascript as the mock's response body type. The script will be being evaluated on each request of the endpoint and respond accordingly.

How to