Skip to content

Commit

Permalink
Rename TempDirectory to CreateTempDirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
retr0h committed Aug 6, 2018
1 parent 59e4507 commit 9314413
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion git/git_public_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (suite *GitTestSuite) SetupTest() {
URL: "https://example.com/user/repo.git",
Version: "abc1234",
Dst: "path/user.repo",
GiltDir: testutil.TempDirectory(),
GiltDir: testutil.CreateTempDirectory(),
}
}

Expand Down
2 changes: 1 addition & 1 deletion git/git_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (suite *GitTestSuite) SetupTest() {
URL: "https://example.com/user/repo.git",
Version: "abc1234",
Dst: "path/user.repo",
GiltDir: testutil.TempDirectory(),
GiltDir: testutil.CreateTempDirectory(),
}
}

Expand Down
2 changes: 1 addition & 1 deletion repositories/repositories_public_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type RepositoriesTestSuite struct {

func (suite *RepositoriesTestSuite) SetupTest() {
suite.r = repositories.Repositories{}
repositories.GiltDir = testutil.TempDirectory()
repositories.GiltDir = testutil.CreateTempDirectory()
}

func (suite *RepositoriesTestSuite) TearDownTest() {
Expand Down
2 changes: 1 addition & 1 deletion repositories/repositories_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type RepositoriesTestSuite struct {

func (suite *RepositoriesTestSuite) SetupTest() {
suite.r = Repositories{}
GiltDir = testutil.TempDirectory()
GiltDir = testutil.CreateTempDirectory()
}

func (suite *RepositoriesTestSuite) TearDownTest() {
Expand Down
4 changes: 2 additions & 2 deletions test/testutil/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"os"
)

// TempDirectory generate a temp directory for tests.
func TempDirectory() string {
// CreateTempDirectory generate and create a temp directory for tests.
func CreateTempDirectory() string {
dir, err := ioutil.TempDir("", "git-test")
if err != nil {
panic(err)
Expand Down

0 comments on commit 9314413

Please sign in to comment.