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 Dec. 3, 2023, 7:11 p.m.