6
0
mirror of https://github.com/grdl/git-get.git synced 2026-02-10 06:09:22 +00:00

Add repo finder tests

This commit is contained in:
Grzegorz Dlugoszewski
2020-07-08 14:58:19 +02:00
parent cdca8b89d9
commit 13e936c376
4 changed files with 116 additions and 20 deletions

View File

@@ -19,8 +19,13 @@ func (r *Repo) Path() string {
// RepoEmpty creates an empty git repo.
func RepoEmpty(t *testing.T) *Repo {
return RepoEmptyInDir(t, "")
}
// RepoEmptyInDir creates an empty git repo inside a given parent dir.
func RepoEmptyInDir(t *testing.T, parent string) *Repo {
r := &Repo{
path: tempDir(t, ""),
path: TempDir(t, parent),
t: t,
}