       purge([GitRepo.MixProject])
     end
 
-    test "gets and compiles dependencies for Rebar" do
-      Mix.Project.push(RebarAsDepWithEnv)
-
-      in_tmp("get and compile dependencies for Rebar", fn ->
-        Mix.Tasks.Deps.Get.run([])
-        assert_received {:mix_shell, :info, ["* Getting git_rebar" <> _]}
-
-        Mix.Tasks.Deps.Compile.run([])
-        assert_received {:mix_shell, :run, ["==> git_rebar (compile)\n"]}
-        assert_received {:mix_shell, :run, ["==> rebar_dep (compile)\n"]}
+    # We run only on Unix because Windows has a hard time
+    # removing the Rebar executable after executed.
+    @tag [unix: true]
+    test "gets and compiles dependencies" do
+      Mix.Project.push(RebarAsDep)
+
+      in_tmp("get and compile dependencies", fn ->
+        Mix.Tasks.Deps.Get.run([])
+        assert_received {:mix_shell, :info, ["* Getting git_rebar " <> _]}
+
+        Mix.Tasks.Deps.Compile.run([])
+        assert_received {:mix_shell, :run, ["===> Compiling git_rebar\n"]}
+        assert_received {:mix_shell, :run, ["===> Compiling rebar_dep\n"]}
         assert :git_rebar.any_function() == :ok
         assert :rebar_dep.any_function() == :ok
 


  describe "integration with Mix" do
    test "inherits Rebar manager" do
      Mix.Project.push(Rebar3AsDep)
      deps = Mix.Dep.load_on_environment([])
      assert Enum.all?(deps, &(&1.manager == :rebar3))
    end

      end)
    end

    test "gets and compiles dependencies with Mix" do
      Mix.Project.push(RebarAsDep)

      in_tmp("get and compile dependencies with Mix", fn ->
        File.write!(MixTest.Case.tmp_path("rebar_dep/mix.exs"), """
        defmodule RebarDep.MixProject do
          use Mix.Project
