I wrote a test like this:
test "Exception should be raised" do
assert_raise MyApp.CustomException, fn -> MyApp.do_something("invalid data") end
end
It passes, but I notice in the terminal when I do a full test pass, I see a red error message after all the dots, e.g. ......................................12:36:48.407 [error] My custom message here
Am I using assert_raise
correctly? Why is that message showing up in the logs?
Thanks for any pointers!