eproxus / meck

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

FIX: optional_callbacks #151

Closed soranoba closed 9 years ago

soranoba commented 9 years ago

There was a case that it cannot mock the module. This module is defined optional callback, but it isn't export this this callback functions.

This pull request fix it, but it is not the best practice...=(

eproxus commented 9 years ago

Thanks! Maybe it would be possible to whitelist instead of blacklist these attributes?

soranoba commented 9 years ago

Thank you for the merge.

It can maybe do, but I'm not confident that can be implemented correctly. Probably, I think that callback is only necessary.... (If the callback is lost, behaviour_info/1 will be also lost.)

eproxus commented 9 years ago

True, good point. Let's leave it like this for now then.