 
 defmodule Mix.ShellTest do
   use MixTest.Case
+  import ExUnit.CaptureIO
 
   test "shell process" do
     Mix.shell.info "abc"


    assert capture_io(fn -> assert Mix.shell.cmd("echo first") == 0 end) ==
           "first\n"
  after
    Mix.shell(Mix.Shell.Process)
  end

  test "shell cmd" do
    assert Mix.shell.cmd("echo first && echo second") == 0
    assert_received { :mix_shell, :run, ["first\nsecond\n"] }
  end
end

  end

  test "shell io" do
    Mix.shell Mix.Shell.IO

    assert capture_io(fn -> Mix.shell.info "abc" end) ==
           "abc\n"
