View Source Patch.Mock.Code.Generators.Frozen (patch v0.15.0)
Generator for frozen
modules.
frozen
modules are generated by taking the target
module and renaming it and ensuring
that any call in the module to itself is sent to the frozen
module and not the provided
module.
The frozen
module simple acts as a way to call the unaltered original code. It is only
used internally to preserve the GenServer module since the internal implementation requires that
GenServer work as expected.
Summary
Functions
Generates a new frozen module based on the forms of a provided module.
Functions
@spec generate(abstract_forms :: [Patch.Mock.Code.form()], module :: module()) :: [ Patch.Mock.Code.form() ]
Generates a new frozen module based on the forms of a provided module.