eproxus / meck

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

Add original module attributes to meck'd module #65

Closed brb closed 12 years ago

brb commented 12 years ago

meck omits original module attributes, for example:

1> proplists:get_value(attributes, supervisor:module_info()).
[{vsn,[114474700268360949500192371998556367091]},
 {behaviour,[gen_server]}]
2> meck:new(supervisor, [unstick]).
ok
3> proplists:get_value(attributes, supervisor:module_info()).
[{vsn,[118933215264849542400101025310352563009]}]

Given patch resolves the issue.

eproxus commented 12 years ago

Good spot! I've merged this as the standard behavior for now. Might consider a no_attributes option in the future, but let's see if this causes any problems first (which it shouldn't).

Merged into develop: d3dcb0e1ba2b9539f23b8e7f9cf541013b2abce6