Skip to content

Commit

Permalink
Set useFancyQuotes = FALSE when running tests
Browse files Browse the repository at this point in the history
R CMD check sets this when running tests, so we should as well
  • Loading branch information
jimhester committed Jul 18, 2018
1 parent b695514 commit 6c30827
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# devtools 1.13.3.9000

* `test()` now sets `useFancyQuotes = FALSE` to better mimic the environment tests
are run under with `R CMD check` (#1735).

* `test_file()` and `test_coverage_file()` now have RStudio addins (#1650)

* `test()` no longer passes encoding argument to `testthat::test_dir()` (#1776)
Expand Down
7 changes: 5 additions & 2 deletions R/test.r
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ test <- function(pkg = ".", filter = NULL, ...) {
testthat_args <- c(testthat_args, load_helpers = FALSE)
}

withr::with_envvar(r_env_vars(),
do.call(testthat::test_dir, testthat_args))
withr::with_options(c(useFancyQuotes = FALSE),
withr::with_envvar(r_env_vars(),
do.call(testthat::test_dir, testthat_args)
)
)
}

#' @export
Expand Down

0 comments on commit 6c30827

Please # to comment.