Function mockito::mock

source ·
pub fn mock<P: Into<Matcher>>(method: &str, path: P) -> Mock
👎Deprecated since 0.32.0: Use Server::mock instead
Expand description

DEPRECATED: This method is part of the legacy interface an will be removed in future versions. You should replace it with Server::mock:

let mut s = mockito::Server::new();
let _m1 = s.mock("GET", "/");

Initializes a mock with the given HTTP method and path.

The mock is registered to the server only after the create() method has been called.