[−][src]Function mockito::mock
pub fn mock<P: Into<Matcher>>(method: &str, path: P) -> Mock
Initializes a mock for the provided method
and path
.
The mock is registered to the server only after the create()
method has been called.
Example
use mockito::mock; let _m1 = mock("GET", "/"); let _m2 = mock("POST", "/users"); let _m3 = mock("DELETE", "/users?id=1");