   ## Cond
 
   test "cond: expands each clause" do
-    assert expand_and_clean(quote do: (cond do x = 1 -> x; _ -> x end)) ==
+    assert expand(quote do: (cond do x = 1 -> x; _ -> x end)) ==
            quote do: (cond do x = 1 -> x; _ -> x() end)
   end
 
   test "cond: does not share lexical scope between clauses" do
-    assert expand_and_clean(quote do: (cond do 1 -> import List; 2 -> flatten([1, 2, 3]) end)) ==
+    assert expand(quote do: (cond do 1 -> import List; 2 -> flatten([1, 2, 3]) end)) ==
            quote do: (cond do 1 -> import :"Elixir.List", []; 2 -> flatten([1, 2, 3]) end)
   end
 
   test "cond: does not leaks vars on head" do
-    assert expand_and_clean(quote do: (cond do x = 1 -> x; y = 2 -> y end; :erlang.+(x, y))) ==
+    assert expand(quote do: (cond do x = 1 -> x; y = 2 -> y end; :erlang.+(x, y))) ==
            quote do: (cond do x = 1 -> x; y = 2 -> y end; :erlang.+(x(), y()))
   end
 
   test "cond: leaks vars" do
-    assert expand_and_clean(quote do: (cond do 1 -> x = 1; 2 -> y = 2 end; :erlang.+(x, y))) ==
+    assert expand(quote do: (cond do 1 -> x = 1; 2 -> y = 2 end; :erlang.+(x, y))) ==
            quote do: (cond do 1 -> x = 1; 2 -> y = 2 end; :erlang.+(x, y))
   end
 

    13
  end

  defp expand_and_clean(expr) do
    cleaner = &Keyword.drop(&1, [:export])
    expr
    |> expand_env(__ENV__)
    |> elem(0)

  ## Receive

  test "receive: expands each clause" do
    assert expand(quote do: (receive do x -> x; _ -> x end)) ==
           quote do: (receive do x -> x; _ -> x() end)
  end

  test "receive: does not share lexical scope between clauses" do
    assert expand(quote do: (receive do 1 -> import List; 2 -> flatten([1, 2, 3]) end)) ==
           quote do: (receive do 1 -> import :"Elixir.List", []; 2 -> flatten([1, 2, 3]) end)
  end

  test "receive: expands guards" do
    assert expand(quote do: (receive do x when x when __ENV__.context -> true end)) ==
           quote do: (receive do x when x when :guard -> true end)
  end

  test "receive: does not leaks clause vars" do
    assert expand(quote do: (receive do x -> x; y -> y end; :erlang.+(x, y))) ==
           quote do: (receive do x -> x; y -> y end; :erlang.+(x(), y()))
  end

  test "receive: leaks vars" do
    assert expand(quote do: (receive do x -> x = x; y -> y = y end; :erlang.+(x, y))) ==
           quote do: (receive do x -> x = x; y -> y = y end; :erlang.+(x, y))
  end

  test "receive: leaks vars on after" do
    assert expand(quote do: (receive do x -> x = x after y -> y; w = y end; :erlang.+(x, w))) ==
           quote do: (receive do x -> x = x after y() -> y(); w = y() end; :erlang.+(x, w))
  end

