Code.require_file "../../test_helper.exs", __FILE__

defmodule Mix.DepsTest do
  use MixTest.Case

  defmodule DepsApp do
    def project do
      [
        deps: [
          { :ok, "0.1.0",         github: "elixir-lang/ok" },
          { :invalidvsn, "0.2.0", path: "deps/invalidvsn" },
          { :invalidapp, "0.1.0", path: "deps/invalidapp" },
          { :noappfile, "0.1.0",  path: "deps/noappfile" },
          { :uncloned,            git: "https://github.com/elixir-lang/uncloned.git" }
        ]
      ]
    end
  end

  test "extracts all dependencies from the given project" do
    Mix.Project.push DepsApp

    in_fixture "deps_status", fn ->
      deps = Mix.Deps.all
      assert Enum.find deps, match?(Mix.Dep[app: :ok, status: { :ok, _ }], &1)
      assert Enum.find deps, match?(Mix.Dep[app: :invalidapp, status: { :invalidapp, _ }], &1)
    end
  end
end
Code.require_file "../../test_helper.exs", __FILE__

defmodule Mix.DepsTest do
  use MixTest.Case

  defmodule DepsApp do
    def project do
      [
        deps: [
          { :ok, "0.1.0",         github: "elixir-lang/ok" },
          { :invalidvsn, "0.2.0", path: "deps/invalidvsn" },
          { :invalidapp, "0.1.0", path: "deps/invalidapp" },
          { :noappfile, "0.1.0",  path: "deps/noappfile" },
          { :uncloned,            git: "https://github.com/elixir-lang/uncloned.git" }
        ]
      ]
    end
  end

  test "extracts all dependencies from the given project" do
    Mix.Project.push DepsApp

    in_fixture "deps_status", fn ->
      deps = Mix.Deps.all
      assert Enum.find deps, match?(Mix.Dep[app: :ok, status: { :ok, _ }], &1)
      assert Enum.find deps, match?(Mix.Dep[app: :invalidapp, status: { :invalidapp, _ }], &1)
    end
  after
    Mix.Project.pop
  end
end
Clean up Mix.project after setting it
Clean up Mix.project after setting it

joshprice/elixir,beedub/elixir,kimshrier/elixir,lexmag/elixir,lexmag/elixir,beedub/elixir,gfvcastro/elixir,antipax/elixir,kimshrier/elixir,kelvinst/elixir,antipax/elixir,michalmuskala/elixir,gfvcastro/elixir,kelvinst/elixir,pedrosnk/elixir,pedrosnk/elixir,ggcampinho/elixir,elixir-lang/elixir,ggcampinho/elixir