Skip to content

Commit

Permalink
close #430
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinFay committed Apr 30, 2020
1 parent 49370fc commit 70db1f5
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ Encoding: UTF-8
Language: en-US
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.0.2
RoxygenNote: 7.1.0
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ importFrom(testthat,quasi_label)
importFrom(usethis,proj_set)
importFrom(usethis,use_build_ignore)
importFrom(usethis,use_package)
importFrom(usethis,use_spell_check)
importFrom(usethis,use_testthat)
importFrom(utils,capture.output)
importFrom(utils,download.file)
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

+ `use_external_*()` function don't open files by default (#404)

+ `use_recommended_tests*()` now calls ` use_spell_check()` (#430)

## Breaking changes

## Bug fix
Expand Down
13 changes: 11 additions & 2 deletions R/use_recommended.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#' }
#'
#' @inheritParams add_module
#' @inheritParams usethis::use_spell_check
#' @param recommended A vector of recommended packages.
#'
#' @importFrom usethis use_testthat use_package
Expand All @@ -28,12 +29,15 @@ use_recommended_deps <- function(

#' @rdname use_recommended
#' @export
#' @importFrom usethis use_testthat use_package
#' @importFrom usethis use_testthat use_package use_spell_check
#' @importFrom utils capture.output
#' @importFrom attempt without_warning
#' @importFrom fs path_abs path
use_recommended_tests <- function (
pkg = get_golem_wd()
pkg = get_golem_wd(),
vignettes = TRUE,
lang = "en-US",
error = FALSE
){
old <- setwd(path_abs(pkg))

Expand All @@ -50,6 +54,11 @@ use_recommended_tests <- function (
golem_sys("utils", "test-golem-recommended.R"),
path(old, "tests", "testthat")
)
use_spell_check(
vignettes = vignettes,
lang = lang,
error = error
)
cat_green_tick("Tests added")
}

Expand Down
23 changes: 20 additions & 3 deletions man/use_recommended.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 70db1f5

Please sign in to comment.