R/my_func.R

Defines functions my.func my.func

# Function under test (returns a named string)
my.func <- function() {
  return(Sys.info()["sysname"])   # e. g. "Linux"
}

my.func.2 <- my.func <- function() {
  return(base::Sys.info()["sysname"])   # e. g. "Linux"
}
aryoda/testthat_base_mocking documentation built on May 20, 2019, 4:26 p.m.