Skip to content

Commit da4565e

Browse files
committed
Don't test DocTest's doctests
1 parent 636275c commit da4565e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/ex_unit/lib/ex_unit/doc_test.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ defmodule ExUnit.DocTest do
5252
2
5353
5454
If you want to keep any two tests separate from each other,
55-
add an empty line between them (assume > to stand for iex> here):
55+
add an empty line between them:
5656
57-
> a = 1
57+
iex> a = 1
5858
1
5959
60-
> a + 1 # will fail with a "function a/0 undefined" error
60+
iex> a + 1 # will fail with a "function a/0 undefined" error
6161
2
6262
6363
Similarly to iex you can use numbers in your "prompts":

lib/ex_unit/test/ex_unit/doc_test_test.exs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ end
9090
defmodule ExUnit.DocTestTest do
9191
use ExUnit.Case
9292

93-
doctest ExUnit.DocTest
93+
# This is intentional. The doctests in DocTest's docs fail for demonstration
94+
# purposes.
95+
#doctest ExUnit.DocTest
9496
doctest ExUnit.DocTestTest.GoodModule, import: true
9597
doctest ExUnit.DocTestTest.SomewhatGoodModule, only: [test_fun: 0], import: true
9698
doctest ExUnit.DocTestTest.SomewhatGoodModule1, except: [test_fun1: 0], import: true

0 commit comments

Comments
 (0)