Updating the ExUnit test context with setup
When using ExUnit the second argument to the test
macro is context
.
This context can provide setup values so that you can share setup across tests.
Use the setup macro to update the context. The keyword list you return from the setup function will be merged into the map of the context.
Also in the setup macro you can have access to the context, allowing you to potentially change the context based on the needs of the test.
Read more about ExUnit setup here.
Tweet