elixir_mock icon indicating copy to clipboard operation
elixir_mock copied to clipboard

defmock_of doesn't work without importing Mockex

Open wanderanimrod opened this issue 8 years ago • 0 comments

` defmodule MyTest do use ExUnit.Case require Mockex

test "fails to compile" do
   with_mock(mock) = defmock_of GenServer do
      def start, do: {:ok, self()}
   end
end

end

`

This will fail to compile with error cannot invoke def/2 inside function/macro

wanderanimrod avatar Apr 04 '17 02:04 wanderanimrod