 
   describe "pushing a `proceed_to_next_stage` event" do
     setup [:join_the_retro_channel]
-    test "broadcasts the same event to connected clients, along with stage", %{ socket: socket } do
+    test "broadcasts the same event to connected clients, along with stage", %{socket: socket} do
       push(socket, "proceed_to_next_stage", %{stage: 0})
 
       assert_broadcast("proceed_to_next_stage", %{"stage" => 0})


  defp join_the_retro_channel(context) do
    retro = context[:retro]
    { :ok, _, socket } =
      socket("", %{ user_token: Phoenix.Token.sign(socket(), "user", @mock_user) })
      |> subscribe_and_join(RetroChannel, "retro:" <> retro.id)

    Map.put(context, :socket, socket)


  describe "pushing a new idea to the socket" do
    setup [:join_the_retro_channel]
    test "results in the broadcast of the new idea to all connected clients", %{socket: socket} do
      push(socket, "new_idea", %{category: "happy", body: "we're pacing well", author: "Travis"})

      assert_broadcast("new_idea_received", %{category: "happy", body: "we're pacing well", id: _, author: "Travis"})
    end
  end

