Collect all intro printing into display

This commit is contained in:
Felipe Sere
2016-05-10 22:57:00 +01:00
parent 3d79284aab
commit 751f849585
3 changed files with 13 additions and 12 deletions

View File

@@ -40,15 +40,9 @@ defmodule Runner do
defp track(_, _, _), do: nil
defp display({:failed, error, module, name}) do
intro(module, Tracker.summarize)
Display.show_failure(error, module, name)
:failed
end
defp display(_), do: :passed
defp intro(module, %{visited_modules: modules}) do
if ! module in modules do
Display.intro(module)
end
end
end