   end
 
   def handle_cast({:test_started, %ExUnit.Test{} = test}, config) do
-    if config.trace, do: IO.write "  * #{test.name}"
+    if config.trace, do: IO.write("  * #{test.name}")
     {:noreply, config}
   end
 
   def handle_cast({:test_finished, %ExUnit.Test{state: nil} = test}, config) do
-    if config.trace do
-      IO.puts success(trace_test_result(test), config)
-    else
-      IO.write success(".", config)
-    end
-    {:noreply, %{config | test_counter: update_test_counter(config.test_counter, test),
-                          test_timings: update_test_timings(config.test_timings, test)}}
+    if config.trace() do
+      IO.puts(success(trace_test_result(test), config))
+    else
+      IO.write(success(".", config))
+    end
+
+    test_counter = update_test_counter(config.test_counter, test)
+    test_timings = update_test_timings(config.test_timings, test)
+    config = %{config | test_counter: test_counter, test_timings: test_timings}
+
+    {:noreply, config}
   end
 
   def handle_cast({:test_finished, %ExUnit.Test{state: {:skip, _}} = test}, config) do
-    if config.trace, do: IO.puts trace_test_skip(test)
-    {:noreply, %{config | test_counter: update_test_counter(config.test_counter, test),
-                          skipped_counter: config.skipped_counter + 1}}
+    if config.trace, do: IO.puts(trace_test_skip(test))
+
+    test_counter = update_test_counter(config.test_counter, test)
+    config = %{config | test_counter: test_counter, skipped_counter: config.skipped_counter + 1}
+
+    {:noreply, config}
   end
 
   def handle_cast({:test_finished, %ExUnit.Test{state: {:invalid, _}} = test}, config) do
-    if config.trace do
-      IO.puts invalid(trace_test_result(test), config)
-    else
-      IO.write invalid("?", config)
-    end
-
-    {:noreply, %{config | test_counter: update_test_counter(config.test_counter, test),
-                          invalid_counter: config.invalid_counter + 1}}
+    if config.trace() do
+      IO.puts(invalid(trace_test_result(test), config))
+    else
+      IO.write(invalid("?", config))
+    end
+
+    test_counter = update_test_counter(config.test_counter, test)
+    config = %{config | test_counter: test_counter, invalid_counter: config.invalid_counter + 1}
+
+    {:noreply, config}
   end
 
   def handle_cast({:test_finished, %ExUnit.Test{state: {:failed, failures}} = test}, config) do
-    if config.trace do
-      IO.puts failure(trace_test_result(test), config)
-    end
-
-    formatted = format_test_failure(test, failures, config.failure_counter + 1,
-                                    config.width, &formatter(&1, &2, config))
+    if config.trace() do
+      IO.puts(failure(trace_test_result(test), config))
+    end
+
+    formatted =
+      format_test_failure(
+        test,
+        failures,
+        config.failure_counter + 1,
+        config.width,
+        &formatter(&1, &2, config)
+      )
+
     print_failure(formatted, config)
     print_logs(test.logs)
 
-    {:noreply, %{config | test_counter: update_test_counter(config.test_counter, test),
-                          test_timings: update_test_timings(config.test_timings, test),
-                          failure_counter: config.failure_counter + 1}}
+    test_counter = update_test_counter(config.test_counter, test)
+    test_timings = update_test_timings(config.test_timings, test)
+    failure_counter = config.failure_counter + 1
+
+    config = %{
+      config
+      | test_counter: test_counter,
+        test_timings: test_timings,
+        failure_counter: failure_counter
+    }
+
+    {:noreply, config}
   end
 
   def handle_cast({:module_started, %ExUnit.TestModule{name: name}}, config) do
-    if config.trace do
-      IO.puts("\n#{inspect name}")
+    if config.trace() do
+      IO.puts("\n#{inspect(name)}")
     end
 
     {:noreply, config}

  ## Printing

  defp print_suite(config, run_us, load_us) do
    IO.write "\n\n"
    IO.puts format_time(run_us, load_us)

    if config.slowest > 0 do
      IO.write "\n"
      IO.puts format_slowest_total(config, run_us)
      IO.puts format_slowest_times(config)
    end

    # singular/plural

    if colors[:enabled] do
      [escape, string, :reset]
      |> IO.ANSI.format_fragment(true)
      |> IO.iodata_to_binary()
    else
      string
    end
