File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -197,6 +197,8 @@ defmodule ExUnit.DocTest do
197197 e in [ ExUnit.ExpectationError ] ->
198198 raise e , [ ] , unquote ( stack )
199199
200+ # If there was no exception among the tests, `exception` here will be
201+ # nil and this clause won't match.
200202 error in [ unquote ( exception ) ] ->
201203 unless error . message == unquote ( message ) do
202204 raise ExUnit.ExpectationError ,
@@ -213,6 +215,9 @@ defmodule ExUnit.DocTest do
213215 [ prelude: "Expected doctest" ,
214216 description: unquote ( whole_expr ) ,
215217 expected: "#{ inspect unquote ( exception ) } " ,
218+ # We're using a combined message here because all expressions
219+ # (those that are expected to raise and those that aren't) are in
220+ # the same try block above.
216221 reason: "complete or raise" ,
217222 actual: inspect ( error ) ] ,
218223 unquote ( stack )
You can’t perform that action at this time.
0 commit comments