Merge pull request #110 from twonds/attribute-errors
Ignore 'depracated' module attribute
diff --git a/src/meck_code_gen.erl b/src/meck_code_gen.erl
index cbfc75b..35f16a8 100644
--- a/src/meck_code_gen.erl
+++ b/src/meck_code_gen.erl
@@ -63,7 +63,7 @@
try
[?attribute(Key, Val) || {Key, Val} <-
proplists:get_value(attributes, Mod:module_info(), []),
- Key =/= vsn]
+ Key =/= vsn, Key =/= deprecated]
catch
error:undef -> []
end.
diff --git a/test/meck_test_module.erl b/test/meck_test_module.erl
index 1f5e51a..e73d1d5 100644
--- a/test/meck_test_module.erl
+++ b/test/meck_test_module.erl
@@ -1,5 +1,6 @@
-module(meck_test_module).
-tag(foobar).
+-deprecated([a/0]).
-export([a/0, b/0, c/2]).
a() -> a.