diff --git a/NAMESPACE b/NAMESPACE index 8df183f..2066cfa 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -4,6 +4,7 @@ S3method(format,tab_list) S3method(knit_print,tab_list) S3method(knit_print,tab_tibble) S3method(print,tab_list) +S3method(vctrs::vec_ptype_abbr,tab_list) export(knit_print) export(new_tab_list) export(new_tab_tibble) diff --git a/R/objects.R b/R/objects.R index 80b319f..374e259 100644 --- a/R/objects.R +++ b/R/objects.R @@ -27,8 +27,9 @@ new_tab_list <- function(x) { vctrs::new_vctr(x, class = "tab_list") } +#' @exportS3Method vctrs::vec_ptype_abbr vec_ptype_abbr.tab_list <- function(x, ...) { - "tablist" + "tab_list" } #' @export diff --git a/tests/testthat/test-knit_print.R b/tests/testthat/test-knit_print.R index 8fb284a..9f7f082 100644 --- a/tests/testthat/test-knit_print.R +++ b/tests/testthat/test-knit_print.R @@ -7,7 +7,7 @@ test_that("knit_print.tab_tibble (and implicitly knit_print.tab_list and print_t ) |> new_tab_tibble() expect_output( - knit_print(d_tab), + suppressWarnings(knit_print(d_tab)), regexp = "Cars with 8 cylinders" ) expect_output(