summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriilyak <iilyak@users.noreply.github.com>2019-08-16 06:16:49 -0700
committerGitHub <noreply@github.com>2019-08-16 06:16:49 -0700
commit8fa6ca1deff5eb61a3949f248b7f40a2febcd9e4 (patch)
tree95a3549ab1ebeb165a25392d45fa3ec9981ca5d4
parent18bda469e69e6e7e375b66490e4ed7df20ae53e5 (diff)
parent119ca034abed834cf9ad400310dbe397c6d8ea9e (diff)
downloadcouchdb-8fa6ca1deff5eb61a3949f248b7f40a2febcd9e4.tar.gz
Merge pull request #2122 from cloudant/cleanup-after-meck
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)}