 
     in_fixture "no_mixfile", fn ->
       assert capture_io(fn ->
-        Mix.Tasks.Profile.Fprof.run(
-          [git_repo]
-        )
+        Fprof.run([git_repo])
       end) =~ ~r(:elixir_module\.compile/4 *\d+ *\d+\.\d{3} *\d+\.\d{3})
     end
   end

  test "sort options" do
    in_fixture "no_mixfile", fn ->
      assert capture_io(fn ->
        Mix.Tasks.Profile.Fprof.run(
          ["-e", "Enum.each(1..5, fn(_) -> HashSet.new end)", "--sort acc"]
        )
      end) =~ ~r(HashSet\.new/0 *5 *\d+\.\d{3} *\d+\.\d{3})

      assert capture_io(fn ->
        Mix.Tasks.Profile.Fprof.run(
          ["-e", "Enum.each(1..5, fn(_) -> HashSet.new end)", "--sort own"]
        )
      end) =~ ~r(HashSet\.new/0 *5 *\d+\.\d{3} *\d+\.\d{3})
    end
  end

  test "errors on missing files" do
    in_fixture "no_mixfile", fn ->
      assert_raise Mix.Error, "No files matched pattern \"non-existent\" given to --require", fn ->
        capture_io(fn -> Fprof.run ["-r", "non-existent"] end)
      end

      assert_raise Mix.Error, "No files matched pattern \"non-existent\" given to --parallel-require", fn ->
        capture_io(fn -> Fprof.run ["-pr", "non-existent"] end)
      end

      assert_raise Mix.Error, "No such file: non-existent", fn ->
        capture_io(fn -> Fprof.run ["non-existent"] end)
      end

      assert File.dir?("lib")
      assert_raise Mix.Error, "No such file: lib", fn ->
        capture_io(fn -> Fprof.run ["lib"] end)
      end
    end
  end
