@hackage mockcat0.5.5.0

Mock library for test in Haskell.

mockcat is a small mocking / stubbing DSL for Haskell tests.

Features:

  • Describe expectations with left-to-right pipelines: `arg |> ... |> result`

  • Generate typeclass mocks via Template Haskell (makeMock, makePartialMock)

  • Create standalone function stubs (createStubFn, constant mocks)

  • Flexible return behaviour: vary by argument or occurrence (including identical args later)

  • Optional per-call variation for `IO a` results

  • Concurrency-safe counting and explicit lazy semantics (unevaluated results are not recorded)

  • Simple verification helpers (apply count predicates, ordering checks)

  • Partial adoption: mock only selected methods; no hidden global state

See README for full examples: https://github.com/pujoheadsoft/mockcat#readme