View Source Mockable (Mockable v0.2.1)

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.

Functions

Link to this function

log_implementation_usage(implementation, function_name, arity, module)

View Source
Link to this function

use(mockable, implementation \\ nil)

View Source

Configures 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.