 
   test "in_project pushes given configuration", context do
     in_tmp context.test, fn ->
-      result = Mix.Project.in_project :foo, ".", [hello: :world], fn _ ->
-        assert Mix.Project.config[:app] == :foo
-        assert Mix.Project.config[:hello] == :world
-        :result
-      end
+      result =
+        Mix.Project.in_project(:foo, ".", [hello: :world], fn _ ->
+          assert Mix.Project.config()[:app] == :foo
+          assert Mix.Project.config()[:hello] == :world
+          :result
+        end)
 
       assert result == :result
     end


  test "returns consolidation path" do
    config = [apps_path: "apps", build_per_environment: true]
    assert Mix.Project.consolidation_path(config) ==
           Path.join(File.cwd!, "_build/dev/consolidated")

  config = [app: :sample, build_per_environment: true]
    assert Mix.Project.consolidation_path(config) ==
           Path.join(File.cwd!, "_build/dev/lib/sample/consolidated")
  end

  test "push and pop projects" do
    refute Mix.Project.get
    Mix.Project.push(SampleProject, "sample")
    assert Mix.Project.get == SampleProject

    assert %{name: SampleProject, config: _, file: "sample"} = Mix.Project.pop
    assert Mix.Project.pop == nil
  end

  test "does not allow the same project to be pushed twice" do


  defp assert_proj_dir_linked_or_copied(source, target, symlink_path) do
    case :file.read_link(source) do
      {:ok, path} ->
        case :os.type() do
          # relative symlink on Windows are broken, see symlink_or_copy/2
          {:win32, _} ->
            assert path ==
                     [source, '..', symlink_path]
                     |> Path.join()
                     |> Path.expand()
                     |> String.to_charlist()

          _ ->
            assert path == symlink_path
        end

      {:error, _} ->
        assert File.ls!(source) == File.ls!(target)
    end
  end
end
