Skip to content

Commit bbd42b6

Browse files
michalmuskalafishcakez
authored andcommitted
Fix ExUnit.MultiError.message/1 implementation
Before, the function would always fail with ProtocolUndefinedError, since the exception struct itself is not enumberable.
1 parent 5c9b474 commit bbd42b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ex_unit/lib/ex_unit/assertions.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ defmodule ExUnit.MultiError do
3030

3131
defexception [errors: []]
3232

33-
def message(exception) do
33+
def message(%{errors: errors}) do
3434
"got the following errors:\n\n" <>
35-
Enum.map_join(exception, "\n\n", fn {kind, error, stack} ->
35+
Enum.map_join(errors, "\n\n", fn {kind, error, stack} ->
3636
Exception.format_banner(kind, error, stack)
3737
end)
3838
end

0 commit comments

Comments
 (0)