R/test_helper.R

Defines functions test_helper

Documented in test_helper

#' Tool to help access internal variables to use in testthat scripts
#'
#' @param var bare name of the internal variable to be accessed.
#'
#' @return Object from internal PCCC name space (if it exists)
#'
#' @export
test_helper <- function(var) {
  # force var to be evaluted inside context of package instead of caller's environment
  eval(parse(text = deparse(substitute(var))))
}

Try the pccc package in your browser

Any scripts or data that you put into this service are public.

pccc documentation built on July 1, 2020, 11:41 p.m.