Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Nov 1, 2018
1 parent b5f8565 commit 31cc552
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/createPackageProject.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ createPackageProject <- function(name, folder = getwd(),
private = TRUE) {
tryCatch({
if (is_available(name)) {
fs::dir_create(file.path(folder, name))
dir.create(file.path(folder, name))
usethis::proj_set(file.path(folder, name),
force = TRUE)
usethis::create_package(file.path(folder, name), open = FALSE,
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-createPackageProject.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ usethis::proj_set(getwd())

test_that("createPackageProject() cleans if there was an error", {
m <- mockery::mock(stop())
with_mock(is_available = m, {
with_mock(dir.create = m, {
expect_message(createPackageProject("blablabla"),
"Oops")
})
Expand Down

0 comments on commit 31cc552

Please sign in to comment.