View Source Mockable (Mockable v0.2.2)
Documentation for Mockable.
Summary
Functions
Configures which module to use for a given mockable module. If no implementation is provided, the mockable module itself will be used.
Configures an implementation to be used only for the duration of the given function. This is used internally and is not expected to be useful for end users, but is documented for completeness.
Functions
log_implementation_usage(implementation, function_name, arity, module)
View SourceConfigures which module to use for a given mockable module. If no implementation is provided, the mockable module itself will be used.
This is useful for testing your Mockable module.
Mockable.use(Client)Or to use a specific implementation:
Mockable.use(Client, ClientMock)This function stores the configuration in process memory so that it is compatible with async tests.
Configures an implementation to be used only for the duration of the given function. This is used internally and is not expected to be useful for end users, but is documented for completeness.