From d2e26c8c9b6aa83d1eb8426b81b22313b03fcc33 Mon Sep 17 00:00:00 2001 From: Luc Tielen Date: Fri, 6 Oct 2017 08:24:49 +0200 Subject: [PATCH] Fix issue #43: Formatter fails with no configured tests --- lib/excheck/formatter.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/excheck/formatter.ex b/lib/excheck/formatter.ex index 4c01cd3..1d7d386 100644 --- a/lib/excheck/formatter.ex +++ b/lib/excheck/formatter.ex @@ -62,6 +62,7 @@ defmodule ExCheck.Formatter do ExCheck.IOServer.reset_test_count total_tests end + defp update_tests_counter(%{}), do: %{} defp update_tests_counter(tests_counter) when is_map(tests_counter) do total_tests = %{tests_counter | test: tests_counter.test + ExCheck.IOServer.total_tests} ExCheck.IOServer.reset_test_count