@@ -86,7 +86,9 @@ defmodule ExUnit.FormatterTest do
8686
8787 failure = [ { :exit , { { error , stack } , { :mod , :fun , [ ] } } , [ ] } ]
8888
89- assert trim_multiline_whitespace ( format_test_failure ( test ( ) , failure , 1 , 80 , & formatter / 2 ) ) =~
89+ format = trim_multiline_whitespace ( format_test_failure ( test ( ) , failure , 1 , 80 , & formatter / 2 ) )
90+
91+ assert format =~
9092 """
9193 1) world (Hello)
9294 test/ex_unit/formatter_test.exs:1
@@ -101,11 +103,16 @@ defmodule ExUnit.FormatterTest do
101103
102104 # 2
103105 :bar
106+ """
104107
105- Attempted function clauses (showing 5 out of 5):
108+ if Access not in :cover . modules ( ) do
109+ assert format =~
110+ """
111+ Attempted function clauses (showing 5 out of 5):
106112
107- def fetch(%module{} = container, key)
108- """
113+ def fetch(%module{} = container, key)
114+ """
115+ end
109116 end
110117
111118 test "formats test exits with assertion mfa" do
@@ -177,11 +184,16 @@ defmodule ExUnit.FormatterTest do
177184
178185 # 2
179186 :bar
187+ """
180188
181- Attempted function clauses (showing 5 out of 5):
189+ if Access not in :cover . modules ( ) do
190+ assert format =~
191+ """
192+ Attempted function clauses (showing 5 out of 5):
182193
183- def fetch(%module{} = container, key)
184- """
194+ def fetch(%module{} = container, key)
195+ """
196+ end
185197
186198 assert format =~ ~r" lib/access.ex:\d +: Access.fetch/2"
187199 end
@@ -418,11 +430,16 @@ defmodule ExUnit.FormatterTest do
418430
419431 # 2
420432 :bar
433+ """
421434
422- Attempted function clauses (showing 5 out of 5):
435+ if Access not in :cover . modules ( ) do
436+ assert failure =~
437+ """
438+ Attempted function clauses (showing 5 out of 5):
423439
424- def fetch(%module{} = container, key)
425- """
440+ def fetch(%module{} = container, key)
441+ """
442+ end
426443
427444 assert failure =~ ~r" \( elixir #{ System . version ( ) } \) lib/access\. ex:\d +: Access\. fetch/2"
428445 end
0 commit comments