Skip to content
Permalink
Browse files

Merge pull request #81 from crowding/auto-test-reporter

auto_test should pay attention to reporter argument
  • Loading branch information...
hadley committed Dec 5, 2013
2 parents 58f4b01 + 9499af0 commit 5c2e59146e8ef09d01b7e0e454ba89b2edb4f45a
Showing with 4 additions and 2 deletions.
  1. +2 −0 NEWS.md
  2. +2 −2 R/auto-test.r
@@ -50,6 +50,8 @@ Other minor improvements and bug fixes include:

* Make `dir_state` less race-y. (Thanks to @craigcitro, #80)

* `auto_test` now pays attention to its 'reporter' argument (Thanks to @crowding, #81)

* Add a new reporter so that `testthat` can test calls to `test_that`.
(Thanks to @craigcitro, #83)

@@ -41,7 +41,7 @@ auto_test <- function(code_path, test_path, reporter = "summary", env = NULL) {
env <- new.env(parent = globalenv())
}
source_dir(code_path, env = env)
test_dir(test_path, env = env)
test_dir(test_path, env = env, reporter = reporter)

starts_with <- function(string, prefix) {
substr(string, 1, nchar(prefix)) == prefix
@@ -59,7 +59,7 @@ auto_test <- function(code_path, test_path, reporter = "summary", env = NULL) {
cat("Changed code: ", paste0(basename(code), collapse = ", "), "\n")
cat("Rerunning all tests\n")
source_dir(code_path, env = env)
test_dir(test_path, env = env)
test_dir(test_path, env = env, reporter = reporter)
} else if (length(tests) > 0) {
# If test changes, rerun just that test
cat("Rerunning tests: ", paste0(basename(tests), collapse = ", "), "\n")

0 comments on commit 5c2e591

Please sign in to comment.
You can’t perform that action at this time.