Skip to main content

render_mock_server_setup

Function render_mock_server_setup 

Source
pub fn render_mock_server_setup(
    out: &mut String,
    fixture: &Fixture,
    e2e_config: &E2eConfig,
)
Expand description

Emit mock server setup lines into a test function body.

Builds MockRoute objects from the fixture’s mock_response (single-response schema) or input.mock_responses (array schema for multiple responses per fixture). The resulting mock_server variable is in scope for the rest of the test function.