nuntius Erlang CI

nuntius is an Erlang/OTP library to mock registered processes. Its main use case is to intercept messages sent to specific processes and to allow the consumer to act upon them.

Usage

nuntius is best used via rebar3's test profile and using Erlang/OTP's Common Test framework:

1. change your rebar.config to include:

{profiles, [{test, [{deps, [nuntius]}]}]}.

2. run your nuntius-enabled tests with:

rebar3 ct

Features

Options for the mock process

The following parameters allow you to configure the interaction between the mock and mocked processes, as well as other elements for debugging:

Understanding the message history

History elements are classified with 6 keys:

Expectation handling

If, when nuntius executes your expectations, none matches the input (which means it's better to have a catch-all) it'll exit with {nuntius, nomatch, StackTrace}. This can be prevented by using option exit_on_nomatch as false (the default is to exit).

On the other hand, if an exception occurs inside one of your expectations, nuntius will also exit with {nuntius, nomatch, StackTrace} so you can analyze what needs to be fixed.

Documentation

Documentation is generated with:

rebar3 ex_doc

after which you can use your favorite Web browser to open doc/index.html.

It is also available, online, at hexdocs.pm/nuntius.

Examples

Examples are found at github.com/nuntius/examples.

Versioning

This project adheres to Semantic Versioning.

Readme

We get inspiration for our README's format/content from Make a README.

Changelog

All notable changes to this project will be referenced from the CHANGELOG.

Contributing

Though this project is maintained by 2Latinos contributions are accepted and welcome. Check CONTRIBUTING.md for more.

License

Check LICENSE.md.