ESpec.Mock

Defines ‘expect` function to mock function using ‘meck’. :meck.new is called with options :non_strict and :passthrough. The :non_strict allows create mocks for modules and functions that do not exist. The :passthroug options allow call other functions in the module. Information about mock is stored in the ‘:espec_mock_agent’ set. Mock are being unloaded after each example

Source

Summary

expect(module, name, function)

Creates mock

start_agent()

Start Agent to save mocked modules

unload()

Unload modules at the end of examples

Functions

expect(module, name, function)

Creates mock

Source
start_agent()

Start Agent to save mocked modules.

Source
unload()

Unload modules at the end of examples

Source