summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/ex_unit/test/ex_unit/capture_log_test.exs12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/ex_unit/test/ex_unit/capture_log_test.exs b/lib/ex_unit/test/ex_unit/capture_log_test.exs
index 4cf0e3db2..be52cf4ed 100644
--- a/lib/ex_unit/test/ex_unit/capture_log_test.exs
+++ b/lib/ex_unit/test/ex_unit/capture_log_test.exs
@@ -104,13 +104,11 @@ defmodule ExUnit.CaptureLogTest do
end
defp wait_capture_removal() do
- case Enum.map(:logger.get_handler_config(), & &1.id) do
- [ExUnit.CaptureServer] ->
- Process.sleep(20)
- wait_capture_removal()
-
- [:default] ->
- :ok
+ if ExUnit.CaptureServer in Enum.map(:logger.get_handler_config(), & &1.id) do
+ Process.sleep(20)
+ wait_capture_removal()
+ else
+ :ok
end
end
end