 
   defp assert_proj_dir_linked_or_copied(source, target, symlink_path) do
     case :file.read_link(source) do
-      {:ok, path} -> 
-        case :os.type 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
+          {: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)
+
+      {:error, _} ->
+        assert File.ls!(source) == File.ls!(target)
     end
   end
 end


  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

      assert result == :result
    end


  test "in_project prints nice error message if fails to load file", context do
    in_tmp context.test, fn ->
      File.write("mix.exs", """
      raise "oops"
      """)

      assert_raise RuntimeError, "oops", fn ->
        Mix.Project.in_project(:hello, ".", [], fn _ ->
          :ok
        end)
      end

      assert_receive {:mix_shell, :error, ["Error while loading project :hello at" <> _]}
