eproxus / meck

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

Fix compile forms error when mock up both behaviour_info and its callback modules by passthrough behaviour_info #64

Closed shino closed 12 years ago

shino commented 12 years ago

This is an alternative fix to #63. So the error description is the same, but write down it again for completeness.

When mock up both behaviour_info and its callback modules, an error(precisely speaking, a waning) occurs when compiling a callback module to backup it.

  1. When compiling a callback module, compiler can not find behaviour_info/1 since it is already mocked away.
  2. If warnings_as_errors exists in compile options, the warning turns into an error.

This pull request make behaviour_info/1 function always passthoughed when mocking existing modules (when they have one). I think this is more neat fix than #63. But this introduces a little difference in mocking.

shino commented 12 years ago

Close this issue because it's useless. cf) #63