eproxus / meck

A mocking library for Erlang
http://eproxus.github.io/meck
Apache License 2.0
811 stars 231 forks source link

no case clause matching #148

Closed gullitmiranda closed 8 years ago

gullitmiranda commented 9 years ago

I have tried to use the project exvcr but I'm having this problem:

  1) test post events (Keenex.Events.Test)
     test/keenex/events_test.exs:12
     ** (CaseClauseError) no case clause matching: {:error, {:undef, [{:cover, :is_compiled, [:ibrowse], []}, {:meck_proc, :get_cover_state, 1, [file: 'src/meck_proc.erl', line: 392]}, {:meck_proc, :backup_original, 3, [file: 'src/meck_proc.erl', line: 347]}, {:meck_proc, :init, 1, [file: 'src/meck_proc.erl', line: 202]}, {:gen_server, :init_it, 6, [file: 'gen_server.erl', line: 328]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 239]}]}}
     stacktrace:
       src/meck_proc.erl:111: :meck_proc.set_expect/2
       src/meck.erl:227: :meck.expect/3
       (elixir) lib/enum.ex:537: Enum."-each/2-lists^foreach/1-0-"/2
       (elixir) lib/enum.ex:537: Enum.each/2
       test/keenex/events_test.exs:13

In the project issue, you can have more detailed information such as environment.

eproxus commented 9 years ago

It looks like you don't have cover on your path. The cover module is part of the tools application, which I just noticed that Meck is not depending on. Did you run this inside a release you created?

cwc commented 8 years ago

On Debian-based distros, installing the erlang-tools package fixes this. You can also install esl-erlang to get the entire Erlang suite if disk space (or Docker image size...) isn't a concern.

gullitmiranda commented 8 years ago

thanks @cwc. I had fixed this problem and I even comment on the solution in issue https://github.com/parroty/exvcr/issues/24#issuecomment-125785876. Sorry for not commenting and closed it.