Skip to content

Commit

Permalink
Merge branch 'feature/methods' into feature/error-in-message
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill Müller committed Mar 1, 2016
2 parents 0a8e153 + db39a8e commit 6cce66e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions R/mock.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
#' expect_equal(x <- 3 * 3, 6),
#' expect_identical(x + 4, 9)
#' )
#' throws_error()(expect_equal(3, 5))
#' throws_error()(expect_identical(3, 5))
#' \dontrun{
#' expect_equal(3, 5)
#' expect_identical(3, 5)
#' }
with_mock <- function(..., .env = topenv()) {
new_values <- eval(substitute(alist(...)))
mock_qual_names <- names(new_values)
Expand Down
2 changes: 1 addition & 1 deletion R/reporter-list.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
NULL


setOldClass('proc_time')
methods::setOldClass('proc_time')

#' List reporter: gather all test results along with elapsed time and
#' file information.
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ show_stack <- function(star = integer(), n = sys.nframe() - 1L) {
}

env_name <- function(x) {
str <- capture.output(print(x))
str <- utils::capture.output(print(x))
gsub("<environment: |>", "", str)
}

Expand Down
6 changes: 4 additions & 2 deletions man/with_mock.Rd

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

0 comments on commit 6cce66e

Please sign in to comment.