         assert_received {:mix_shell, :error, ["Dependencies have diverged:"]}
         refute Process.get(:remote_converger)
       end
-    end
+    end)
   after
     Mix.RemoteConverger.register(nil)
   end
 
   test "remote converger is not invoked if deps graph has cycles" do
-    deps = [{:app1, "0.1.0", path: "app1"},
-            {:app2, "0.1.0", path: "app2"}]
-
-    with_deps deps, fn ->
+    deps = [{:app1, "0.1.0", path: "app1"}, {:app2, "0.1.0", path: "app2"}]
+
+    with_deps(deps, fn ->
       Mix.RemoteConverger.register(RaiseRemoteConverger)
 
       in_fixture "deps_cycle", fn ->


        assert Process.get(:remote_converger)
      end
    end
  after
    Mix.RemoteConverger.register(nil)
  end

             deps: [{:git_repo, "0.2.0", git: MixTest.Case.fixture_path("git_repo"), optional: true}]]
          end
        end
        """)

        assert Enum.map(Mix.Dep.loaded([]), & &1.app) == [:git_repo, :deps_repo]
      end
    end)
  end

  test "nested deps with optional dependencies and cousin conflict" do
    with_deps(
      [
        {:deps_repo1, "0.1.0", path: "custom/deps_repo1"},
        {:deps_repo2, "0.1.0", path: "custom/deps_repo2"}
      ],
      fn ->
        in_fixture "deps_status", fn ->
          File.mkdir_p!("custom/deps_repo1")

          File.write!("custom/deps_repo1/mix.exs", """
          defmodule DepsRepo1 do
            use Mix.Project

            def project do
              [app: :deps_repo1,
               version: "0.1.0",
               deps: [{:git_repo, "0.2.0", git: MixTest.Case.fixture_path("git_repo"), optional: true}]]
            end
          end
          """)

          File.mkdir_p!("custom/deps_repo2")

          File.write!("custom/deps_repo2/mix.exs", """
          defmodule DepsRepo2 do
            use Mix.Project

            def project do
              [app: :deps_repo2,
               version: "0.1.0",
               deps: [{:git_repo, "0.2.0", path: "somewhere"}]]
            end
          end
          """)

          Mix.Tasks.Deps.run([])
          assert_received {:mix_shell, :info, ["* git_repo" <> _]}
          assert_received {:mix_shell, :info, [msg]}
          assert msg =~ "different specs were given for the git_repo"
        end
      end
    )
  end

  ## Remove converger
