View Source Dummy.Method (dummy v2.0.0)

Handles replacing methods

Summary

Functions

Replaces a method with a mock, according to how the mock was defined: "function", "function/N", {"function", value}, {"function/N", value} or {"function", fn}

Functions

Replaces a method with a mock, according to how the mock was defined: "function", "function/N", {"function", value}, {"function/N", value} or {"function", fn}

"function/<arity>" replaces a function with one that returns "function/<arity>".

"function" is a shorthand for "function/1"

{"function", value} replaces the function with an anonymous, single-argument function that returns 'value'

{"function", fn a, b, .. -> body end} replaces the original function with the given one.