Skip to content

Commit 30246d3

Browse files
authored
Merge pull request #2 from humanpred/testing
Improve testing
2 parents 8f650bf + 4dbe0bc commit 30246d3

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ S3method(format,tab_list)
44
S3method(knit_print,tab_list)
55
S3method(knit_print,tab_tibble)
66
S3method(print,tab_list)
7+
S3method(vctrs::vec_ptype_abbr,tab_list)
78
export(knit_print)
89
export(new_tab_list)
910
export(new_tab_tibble)

R/objects.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ new_tab_list <- function(x) {
2727
vctrs::new_vctr(x, class = "tab_list")
2828
}
2929

30+
#' @exportS3Method vctrs::vec_ptype_abbr
3031
vec_ptype_abbr.tab_list <- function(x, ...) {
31-
"tablist"
32+
"tab_list"
3233
}
3334

3435
#' @export

tests/testthat/test-knit_print.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ test_that("knit_print.tab_tibble (and implicitly knit_print.tab_list and print_t
77
) |>
88
new_tab_tibble()
99
expect_output(
10-
knit_print(d_tab),
10+
suppressWarnings(knit_print(d_tab)),
1111
regexp = "Cars with 8 cylinders"
1212
)
1313
expect_output(

0 commit comments

Comments
 (0)