Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 608 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 608 Bytes

IncompleteBehaviour

A small library to write partial implementations of behaviours without warnings. Exercise care when using.

This was implemented for the use-case of Mox stubs, where modules need to implement the mocked behaviour. Sometimes, we wanted to use modules as stubs, but without implementing all functions.

Installation

This library is available on Hex. Add to your deps:

{:incomplete_behaviour, "~> 1.0"}

Usage

Simply add use IncompleteBehaviour in your module:

defmodule MyModule do
    @behaviour MyBehaviour
    use IncompleteBehaviour
end