tests/testthat/helper-utils.R

simulate_ellmer <- function() {
  setClass(
    Class = "simulate_provider",
    slots = c(name = "character", model = "character"),
    contains = "list"
  )

  ellmer_object <- list(
    get_provider = function() {
      x <- as(list(), "simulate_provider")
      x@name <- "test_name"
      x@model <- "test_model"
      x
    }
  )
  class(ellmer_object) <- "Chat"
  ellmer_object
}

Try the lang package in your browser

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

lang documentation built on June 5, 2026, 5:08 p.m.