Examples.EModuleCreator (gt_bridge v0.17.1)

Copy Markdown View Source

I am examples for GtBridge.ModuleCreator.

create_module/0 is the building block: it primes a clean state, creates the scratch module, asserts the success payload, and returns it — leaving the artifact on disk so downstream examples compose on top. refuses_existing/0 chains on create_module/0 to reach the "module already exists" precondition without its own setup helper, then cleans up after asserting the refusal.

rerun?/1 is true everywhere because each example has real side effects (file write, module load) that caching the result would mask. Composition still works: a chained call re-runs the upstream example, which is what we want — the artifact has to actually exist on disk for the refusal to fire.

Summary

Functions

copy(item)

Callback implementation for ExExample.Behaviour.copy/1.

create_module()

@spec create_module() :: map()

refuses_erlang_atom()

@spec refuses_erlang_atom() :: {:error, :not_elixir_module}

refuses_existing()

@spec refuses_existing() :: {:error, :exists}

rerun?(_)

Callback implementation for ExExample.Behaviour.rerun?/1.