R/conditions.R

Defines functions require_rstudio msg_testfile_does_not_exist

msg_testfile_does_not_exist <- function(x){
  message(
    sprintf("The file '%s' does not exist. ", x),
    "You can create it with testthis::test_skeleton()."
  )
}




require_rstudio <- function(){
  if(!requireNamespace("rstudioapi", quietly = TRUE)){
    stop("This function requires access the RStudio API", call. = FALSE)
  }
}
s-fleck/testthis documentation built on Feb. 23, 2022, 3:48 p.m.