parapluu/Concuerror

Add mocking support

Opened this issue · 0 comments

When applying Concuerror on large software projects it is desirable to be able to use mocks, in order to not modify application code.

Features:

  • have arbitrary code in mocks
  • mock non-exported functions (not important)

Ideas:

  • Use eproxus/meck: rejected, as meck mocks use communication with one gen_server per mocked module, which has further calls to cover (so it cannot easily be instrumented) and introduces ordering/races.
  • Use a new option:
    • Name: mock
    • Arguments:
      • the name of an exported, 0-arity function returning a list of
        • {From :: mfa(), To :: fun()} tuples