   defp spawn_test(_config, test, context) do
     self_pid = self
 
-    { test_pid, test_ref } = Process.spawn_monitor(fn ->
-      { us, test } = :timer.tc(fn ->
-        { test, context } = exec_test_setup(test, context)
-        if nil?(test.state) do
-          test = exec_test(test, context)
-        end
-        exec_test_teardown(test, context)
+    { test_pid, test_ref } =
+      Process.spawn_monitor(fn ->
+        { us, test } =
+          :timer.tc(fn ->
+            case exec_test_setup(test, context) do
+              { :ok, { test, context } } ->
+                if nil?(test.state) do
+                  test = exec_test(test, context)
+                end
+                exec_test_teardown(test, context)
+              { :error, test } ->
+                test
+            end
+          end)
+
+        send self_pid, { self, :test_finished, test.time(us) }
       end)
-
-      send self_pid, { self, :test_finished, test.time(us) }
-    end)
 
     receive do
       { ^test_pid, :test_finished, test } ->

  defp spawn_case(config, test_case, tests) do
    self_pid = self

    { case_pid, case_ref } = Process.spawn_monitor fn ->
      { test_case, context } = exec_case_setup(test_case)

      tests =
        if test_case.state == :passed do
          Enum.each tests, &run_test(config, &1, context)
          []
        else
          Enum.map tests, &(&1.state({ :invalid, test_case }))
        end

      test_case = exec_case_teardown(test_case, context)
      send self_pid, { self, :case_finished, test_case, tests }
    end

    receive do
      { ^case_pid, :case_finished, test_case, tests } ->


  defp exec_case_setup(ExUnit.TestCase[name: case_name] = test_case) do
    { :ok, context } = case_name.__ex_unit__(:setup_all, [case: case_name])
    { :ok, { test_case.state(:passed), context } }
  catch
    kind, error ->
      { :error, test_case.state({ :failed, { kind, Exception.normalize(kind, error), pruned_stacktrace } }) }
  end

  defp exec_case_teardown(ExUnit.TestCase[name: case_name] = test_case, context) do
