Skip to content

Commit 360ba4e

Browse files
committed
docs: README.md improvements
1 parent 6faf39c commit 360ba4e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![License](https://img.shields.io/badge/License-0BSD-blue.svg)](https://opensource.org/licenses/0bsd)
88
[![Last Updated](https://img.shields.io/github/last-commit/grantwest/mockable.svg)](https://github.com/grantwest/mockable/commits/main)
99

10-
Zero boilerplate mock delegation.
10+
Zero boilerplate implementation delegation.
1111

1212
## Example
1313

@@ -97,13 +97,16 @@ Why do we need this? TemperatureClient is always going to run the delegation log
9797

9898
Mockable works by using a `__before_compile__` macro to wrap each callback implementation in delegation logic. But it only does this if `:mockable` is configured for the module, thus it does not affect production code.
9999

100+
Mockable is not a mock framework. It works with the mock framework of your choice. It helps delegate function calls to mocks. If you are coming from OOP, Mockable serves a similar purpose to dependency injection in tests.
101+
100102
Features/Benefits:
101103

102104
- Zero boilerplate code
103105
- Can be used with Exunit `async: true`
104106
- Compatible with Mox/Hammox (and probably any other mocking library)
105107
- Applies @callback as @spec on implementations to enable dialyzer checks
106-
- Configurable with Application environment & process memory
107108
- Completely compiles out in prod builds, not requiring even an `Application.get_env`, making it suitable for frequently called functions
108109
- Behaviour and implementation defined in the same module for easy finding/reading
109110
- Only overrides callbacks, other functions defined within the Mockable module are not delegated and can be called as normal
111+
- IDE "navigate to definition" features work as expected
112+
- Flexible options for configuring delegation

0 commit comments

Comments
 (0)