You can do a multiline doctest by using '...>' for the lines following the first
iex> Foo.Bar.somethingConditional("baz") ...> |> case do ...> {:ok, _} -> true ...> {:error, _} -> false ...> end true