dashbitco / mox

Mocks and explicit contracts in Elixir
1.35k stars 77 forks source link

Extend `allow` to use $callers #94

Closed leggebroten closed 4 years ago

leggebroten commented 4 years ago

Problem: Expectations of Mocks made by another process cannot be allowed until the process under test has been fully initialized.

Thus, testing of expectations of calls during the initialization process must use "global".

What about adding a allow_children(parent_pid) function that would allow the expectation framework to use $callers to search for allowances?