First, the test itself should work because the character has a :name, so I can't get that test to "pass". When changing it so it does throw an error, the whole liveview process throws an error:
Options I attempted:
I tried the original with no name passed to the struct
I tried using assert_raise with the third param, including the message but isn't required and made the test long (and still failed)
I tried to use assert_raise as well but the argument error is still propagated to the livebook, and kills compilation.
iex> assert_raise ArgumentError, fn -> %Character{} end
:ok
There's a CI issue I should be able to fix fairly easily when I have time. Since it is an improvement, I'm going to merge this in. Thank you, @jonathanstiansen, for the catch!
First, the test itself should work because the character has a
:name
, so I can't get that test to "pass". When changing it so it does throw an error, the whole liveview process throws an error:Options I attempted:
assert_raise
with the third param, including the message but isn't required and made the test long (and still failed)assert_raise
as well but the argument error is still propagated to the livebook, and kills compilation.