Skip to main content

apply_default_expectations

Function apply_default_expectations 

Source
pub fn apply_default_expectations(mock: &mut MockHostBindings)
Expand description

Applies the same default .returning(...) wiring as create_default_mock onto an existing mock instead of constructing a new one.

Exposed so callers (e.g. scenario builders in xrpl-stdlib-test-utils) can register their own expectations on a fresh mock first, then layer these defaults on top as a fallback: mockall checks expectations in the order they were registered, so registering scenario-specific expectations before calling this function lets them take priority over the unconditional defaults added here.