 
 defmodule ExUnit.DocTestTest.NoImport do
   @doc """
-  iex> ExUnit.DocTestTest.NoImport.min(1, 2)
+  iex> ExUnit.DocTestTest.NoImport.max(1, 2)
+  {:ok, 2}
+
+  iex> max(1, 2)
   2
   """
-  def min(a, b), do: max(a, b)
+  def max(a, b), do: {:ok, Kernel.max(a, b)}
 end |> write_beam
 
 defmodule ExUnit.DocTestTest.Invalid do

    end

    ExUnit.Server.cases_loaded()
    assert capture_io(fn -> ExUnit.run end) =~ "1 test, 0 failures"
  end

  test "multiple exceptions in one test case is not supported" do

           "oops"
         code: raise "oops"
         stacktrace:
           test/ex_unit/doc_test_test.exs:145: ExUnit.DocTestTest.Invalid (module)
    """

    assert output =~ """
      7) test doc at ExUnit.DocTestTest.Invalid.a/0 (7) (ExUnit.DocTestTest.ActuallyCompiled)
         test/ex_unit/doc_test_test.exs:391
         Doctest did not compile, got: (SyntaxError) test/ex_unit/doc_test_test.exs:151: syntax error before: '*'
         code: 1 + * 1
         stacktrace:
           test/ex_unit/doc_test_test.exs:151: ExUnit.DocTestTest.Invalid (module)
    """

    assert output =~ """
      8) test doc at ExUnit.DocTestTest.Invalid.b/0 (8) (ExUnit.DocTestTest.ActuallyCompiled)
         test/ex_unit/doc_test_test.exs:391
         Doctest did not compile, got: (SyntaxError) test/ex_unit/doc_test_test.exs:157: syntax error before: '*'
         code: 1 + * 1
         stacktrace:
           test/ex_unit/doc_test_test.exs:157: ExUnit.DocTestTest.Invalid (module)
    """

    assert output =~ """
      9) test doc at ExUnit.DocTestTest.Invalid.dedented_past_fence/0 (9) (ExUnit.DocTestTest.ActuallyCompiled)
         test/ex_unit/doc_test_test.exs:391
         Doctest did not compile, got: (SyntaxError) test/ex_unit/doc_test_test.exs:181: unexpected token: "`" (column 5, codepoint U+0060)
         code: 3
                   ```
         stacktrace:
           test/ex_unit/doc_test_test.exs:180: ExUnit.DocTestTest.Invalid (module)
    """

    assert output =~ """
     10) test doc at ExUnit.DocTestTest.Invalid.indented_not_enough/0 (10) (ExUnit.DocTestTest.ActuallyCompiled)
         test/ex_unit/doc_test_test.exs:391
         Doctest did not compile, got: (SyntaxError) test/ex_unit/doc_test_test.exs:165: unexpected token: "`" (column 1, codepoint U+0060)
         code: 3
               `
         stacktrace:
           test/ex_unit/doc_test_test.exs:164: ExUnit.DocTestTest.Invalid (module)
    """

    assert output =~ """
     11) test doc at ExUnit.DocTestTest.Invalid.indented_too_much/0 (11) (ExUnit.DocTestTest.ActuallyCompiled)
         test/ex_unit/doc_test_test.exs:391
         Doctest did not compile, got: (SyntaxError) test/ex_unit/doc_test_test.exs:173: unexpected token: "`" (column 3, codepoint U+0060)
         code: 3
                 ```
         stacktrace:
           test/ex_unit/doc_test_test.exs:172: ExUnit.DocTestTest.Invalid (module)
    """
  end

