 
       Port.command(port, "\n")
 
-      assert receive_until_match(port, "seed", []) =~ "2 tests"
+      assert receive_until_match(port, "seed", "") =~ "2 tests"
 
       File.write!("test/b_test_stale.exs", """
       defmodule BTest do


      Port.command(port, "\n")

      assert receive_until_match(port, "seed", []) =~ "2 tests"
    end
  end

  defp receive_until_match(port, expected, acc) do
    receive do
      {^port, {:data, output}} ->
        acc = [acc | output]

        if output =~ expected do
          IO.iodata_to_binary(acc)
        else
          receive_until_match(port, expected, acc)
        end

    in_fixture "test_stale", fn ->
      port = mix_port(~w[test --stale --listen-on-stdin])

      assert receive_until_match(port, "seed", "") =~ "2 tests"

      Port.command(port, "\n")

      assert receive_until_match(port, "No stale tests", "") =~ "Restarting..."
    end
  end

