You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ii...@apache.org on 2019/08/16 13:16:54 UTC
[couchdb] branch master updated: Call :meck.unload() automatically
after every test
This is an automated email from the ASF dual-hosted git repository.
iilyak pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/master by this push:
new 119ca03 Call :meck.unload() automatically after every test
new 8fa6ca1 Merge pull request #2122 from cloudant/cleanup-after-meck
119ca03 is described below
commit 119ca034abed834cf9ad400310dbe397c6d8ea9e
Author: ILYA Khlopotov <ii...@apache.org>
AuthorDate: Fri Aug 16 12:24:01 2019 +0000
Call :meck.unload() automatically after every test
---
test/elixir/lib/ex_unit.ex | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/test/elixir/lib/ex_unit.ex b/test/elixir/lib/ex_unit.ex
index 7abba07..8503cd9 100644
--- a/test/elixir/lib/ex_unit.ex
+++ b/test/elixir/lib/ex_unit.ex
@@ -35,6 +35,10 @@ defmodule Couch.Test.ExUnit.Case do
end
setup context do
+ on_exit(fn ->
+ :meck.unload()
+ end)
+
case context do
%{:setup => setup_fun} ->
{:ok, Setup.setup(context, setup_fun)}