tests: properly setup and teardown

This commit is contained in:
Carlos Martín Nieto
2013-09-02 20:10:38 +02:00
parent 8f9ca440d9
commit 895041b2a7
2 changed files with 22 additions and 8 deletions

View File

@@ -1 +1,11 @@
ExUnit.start
defmodule RepoHelpers do
def tmp_bare do
{a, b, c} = :erlang.now()
n = node()
dir = :io_lib.format("geef-~p~p~p~p.git", [n, a, b, c])
path = Path.join(System.tmp_dir!, dir)
{Geef.Repository.init(path, true), path}
end
end