klajo / mockgyver

A mocking library for Erlang
BSD 3-Clause "New" or "Revised" License
38 stars 13 forks source link

separate creating new modules/function from mocking existing ones #2

Open klajo opened 12 years ago

klajo commented 12 years ago

Today one can use the ?WHEN macro, both to create new modules and override the behaviour of existing ones. This has the benefit that it is possible to add new modules or new functions to existing modules, but the downside that misspelled names may go unnoticed.

It is therefore suggested that a new macro is added which shall be used to add new modules/functions, whereas the existing ?WHEN macro is changed to only allow mocking existing functions.