extract assert_raise ExUnit.ExpectationError to dedicated function