EUnit best practices?

Ryan Zezeski <>
Sun Jul 18 06:58:45 CEST 2010

Is it a code smell to write a test function that has the following form?

test_foo() ->
  Stuff = make_stuff(),
  {ok, ...} = Stuff, % match some stuff

Specifically, I'm curious if it's non-idiomatic to call multiple asserts in
a "simple test function?"  Should I be using a "test generating function?"
 If so, why?  What advantages does it offer me over the above?


More information about the erlang-questions mailing list