       use ExUnit.Case
 
       setup do
-        on_exit fn ->
-          IO.puts "on_exit setup run"
-        end
-
-        on_exit {:overridden, 1}, fn ->
-          IO.puts "on_exit 1 overridden -> not run"
-        end
+        on_exit(fn ->
+          IO.puts("on_exit setup run")
+        end)
+
+        on_exit({:overridden, 1}, fn ->
+          IO.puts("on_exit 1 overridden -> not run")
+        end)
 
         :ok
       end
 
       setup_all do
-        on_exit fn ->
-          IO.puts "on_exit setup_all run"
-        end
-
-        :ok
-      end
-
-      test "ok" do
-        on_exit fn ->
-          IO.puts "simple on_exit run"
-        end
-
-        on_exit {:overridden, 2}, fn ->
-          IO.puts "on_exit 2 overridden -> not run"
-        end
-
-        on_exit {:overridden, 2}, fn ->
-          IO.puts "on_exit 2 overrides -> run"
-        end
-
-        on_exit {:overridden, 1}, fn ->
-          IO.puts "on_exit 1 overrides -> run"
-        end
+        on_exit(fn ->
+          IO.puts("on_exit setup_all run")
+        end)
+
+        :ok
+      end
+
+      test "ok" do
+        on_exit(fn ->
+          IO.puts("simple on_exit run")
+        end)
+
+        on_exit({:overridden, 2}, fn ->
+          IO.puts("on_exit 2 overridden -> not run")
+        end)
+
+        on_exit({:overridden, 2}, fn ->
+          IO.puts("on_exit 2 overrides -> run")
+        end)
+
+        on_exit({:overridden, 1}, fn ->
+          IO.puts("on_exit 1 overrides -> run")
+        end)
 
         :ok
       end

      use ExUnit.Case, async: false

      test "ok" do
        on_exit fn -> Process.exit(self(), :kill) end
        :ok
      end
    end

    ExUnit.Server.modules_loaded()
    assert capture_io(fn -> ExUnit.run end) =~
           ">) killed"
  end

  defp no_formatters! do
    ExUnit.configure(formatters: [])
    on_exit fn -> ExUnit.configure(formatters: [ExUnit.CLIFormatter]) end
  end

  test "exits with shutdown reason" do


    no_formatters!()
    ExUnit.Server.modules_loaded()
    output = capture_io(fn -> ExUnit.run() end)

    expected = """
    on_exit 2 overrides -> run
    simple on_exit run
    on_exit 1 overrides -> run
