1context("methods") 2 3expect_ellipsis <- function(name, method) { 4 sym <- as.name(name) 5 eval(bquote({ 6 .(sym) <- method 7 expect_true("..." %in% names(formals(.(sym)))) 8 })) 9} 10 11test_that("all methods have ellipsis", { 12 symbols <- ls(env = asNamespace("DBI")) 13 objects <- mget(symbols, env = asNamespace("DBI"), mode = "function", ifnotfound = rep(list(NULL), length(symbols))) 14 is_method <- vapply(objects, inherits, "standardGeneric", FUN.VALUE = logical(1L)) 15 methods <- objects[is_method] 16 Map(expect_ellipsis, names(methods), methods) 17}) 18