Today I got to use the
flunk/1 function in an ExUnit test. I like everything about this function, from its name to its signature.
Here’s how we used it:
case result do "bad" -> flunk("Your result is bad, and you should feel bad.") "good" -> assert result_passes_other_tests(result) end
It fit well into a helper function that should fail if my
result ever comes back a certain way.