I'm totally ok with writing a "normal" test capturing the IO
for this.
Would just like to know if it is possible to use Doctest.
An example would be:
defmodule CLI do
@doc """
Politely says Hello.
## Examples
iex> CLI.main([])
"Hello dear person." # this would be the expected IO output
"""
def main(args) do
IO.puts "Hello dear person."
end
end
defmodule CLITest do
use ExUnit.Case
doctest CLI
end