Meck is a mocking library for Erlang that enables you to easily mock Erlang modules during testing. You can create modules, add functions, specify return values and throw exceptions. You can also look at a history of the calls made to the module, and make assertions based on that history. Meck can be used for any kind of testing, but is particularly useful in unit or component testing where it is sometimes difficult to handle dependencies on external components or libraries. Meck has been used in production in many different projects for about two years.
This tutorial will give you an introduction to using Meck together with EUnit and other test libraries.
Adam LindbergAuthor of the open source mocking library meck
Adam has a degree in Computer Science from the IT University of Gothenburg, where he wrote his thesis on using QuickCheck and Ejabberd to test the XMPP specifications. He joined Erlang Solutions as a technical consultant, first in their London office, and later helping found their Stockholm one. While at Erlang Solutions, he led a team of eight, developing a domain specific language to handle real-time telephonic traffic manipulation. He now develops Erlang-based embedded systems for the automotive industry. Adam is the author of the open source mocking library meck and has spoken at many conferences and workshops.