Skip to content

Instantly share code, notes, and snippets.

@digitalronin
Last active March 8, 2016 16:35
Show Gist options
  • Save digitalronin/dc81b24f2fa4264b524f to your computer and use it in GitHub Desktop.
Save digitalronin/dc81b24f2fa4264b524f to your computer and use it in GitHub Desktop.
ExUnit.DocTest: Doesn't run test when "iex>" prefix contains numbers
# using Elixir 1.2.2
$ mix new my_app
$ cd my_app
$ vi lib/my_app.ex
defmodule MyApp do
@doc """
iex(1)> MyApp.foo
123
"""
def foo do
456
end
end
$ mix test # <- runs 1 test, 0 failures
$ vi lib/my_app.ex
defmodule MyApp do
@doc """
iex> MyApp.foo
123
"""
def foo do
456
end
end
$ mix test # <- runs 2 tests, 1 failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment