Skip to content

Commit

Permalink
stub one level less deep
Browse files Browse the repository at this point in the history
  • Loading branch information
andrie committed Dec 26, 2017
1 parent 0568751 commit 864246b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/addPackages.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ addPackage <- function(pkgs = NULL, path = NULL, repos = getOption("repos"),
dupes <- with(curr.df, package[duplicated(package)])
if (length(dupes)) {
to_remove <- lapply(dupes, findPrevPackage)
if(length(unlist(to_remove))){
if (length(unlist(to_remove))) {
file.remove(prev[unlist(to_remove)])
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-5-updateRepo.R
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ for (pkg_type in names(types)) {
skip_on_cran()
skip_if_offline(MRAN_mirror)

mockery::stub(updatePackages, "updateRepoIndex", mock.updateRepoIndex, depth = 3)
mockery::stub(updatePackages, "makeRepo", mock.makeRepo, depth = 3)
mockery::stub(updatePackages, "updateRepoIndex", mock.updateRepoIndex, depth = 2)
mockery::stub(updatePackages, "makeRepo", mock.makeRepo, depth = 2)

prefix <- repoPrefix(pkg_type, Rversion = rvers)

Expand Down

0 comments on commit 864246b

Please sign in to comment.