       |> Ecto.Changeset.apply_changes
       |> GameForm.save
 
+      GameServer.Registry.create 1
+
       on_exit fn ->
-        :mnesia.clear_table GameForm
+        BattleSnake.GameServerTesting.teardown
+        MnesiaTesting.teardown
       end
 
       :ok


  describe "GET index" do
    setup do
      running_game = %GameForm{}
      |> GameForm.changeset(%{})
      |> Ecto.Changeset.put_change(:id, 1)
      |> Ecto.Changeset.apply_changes
      |> GameForm.save

      dead_game = %GameForm{}
      |> GameForm.changeset(%{})

    test "lists all games", %{conn: conn} do
      conn = get conn, api_game_path(conn, :index)
      assert [%{"id" => 1,
                "status" => "suspend"},
              %{"id" => 2,
                "status" => "dead"}] =
        json_response(conn, 200)
