Using setup and foreach in eunit tests
For when you want to run both per-suite and per-test setup and cleanup in eunit tests.
the_test_() ->
{setup, fun suite_setup/0, fun suite_cleanup/1,
{foreach, fun setup/0, fun cleanup/1, [
% tests go here
]}};