Stubs, mocks and spies

Version 0.2.0 Updated Nov 27, 2025

Use the controller to register doubles:

cmd_mox.stub("ls")
cmd_mox.mock("git")
cmd_mox.spy("curl")
  • Stubs provide canned responses without strict checking.
  • Mocks enforce exact usage during verification.
  • Spies record every call for later inspection and can behave like stubs.

Each call returns a CommandDouble that offers a fluent DSL to configure behaviour.