Skip to content

Commit

Permalink
restructured test start for repo init and repo actions
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixErnst committed Apr 8, 2021
1 parent ba62b14 commit af229c3
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions tests/skeleton_git2r.R
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,16 @@ testRepoActions <- function(repodir){
}
}

runTest <- function(wd, location = "gh-pages"){
options("dratBranch" = location)
repodir <- testSkeletonGit2r(wd)
testRepoActions(repodir)
unlink(file.path(wd,"foo"), recursive = TRUE)
unlink(file.path(wd,"drat"), recursive = TRUE)
}

wd <- tempdir()
if (requireNamespace("git2r", quietly=TRUE)) {
options("dratBranch" = "gh-pages")
repodir <- testSkeletonGit2r(wd)
testRepoActions(repodir)
unlink(file.path(wd,"drat"), recursive = TRUE)
runTest(wd, "gh-pages")
}
options("dratBranch" = "docs")
repodir <- testSkeletonGit2r(wd)
testRepoActions(repodir)
runTest(wd, "docs")

0 comments on commit af229c3

Please sign in to comment.