R/utils-mocks.R

Defines functions read_line require_namespace is_interactive

# These functions were created to be used with the 'mockr' package.
# Sort by type or alphabetical order.

is_interactive <- function(...) {
  interactive()
}

require_namespace <- function(x, ..., quietly = TRUE) {
  requireNamespace(x, ..., quietly = quietly)
}

read_line <- function(prompt, ...) {
  readline(prompt)
}
gipsousp/mctq documentation built on Oct. 14, 2024, 3:34 a.m.