summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorILYA Khlopotov <iilyak@apache.org>2019-08-16 12:24:01 +0000
committerILYA Khlopotov <iilyak@apache.org>2019-08-16 12:24:01 +0000
commit119ca034abed834cf9ad400310dbe397c6d8ea9e (patch)
tree95a3549ab1ebeb165a25392d45fa3ec9981ca5d4
parent18bda469e69e6e7e375b66490e4ed7df20ae53e5 (diff)
downloadcouchdb-119ca034abed834cf9ad400310dbe397c6d8ea9e.tar.gz
Call :meck.unload() automatically after every test
-rw-r--r--test/elixir/lib/ex_unit.ex4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/elixir/lib/ex_unit.ex b/test/elixir/lib/ex_unit.ex
index 7abba07ef..8503cd991 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)}