diff --git a/DESCRIPTION b/DESCRIPTION index 3aae3b1..c7a59b9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -33,7 +33,7 @@ Suggests: curl, knitr, rmarkdown, - testthat, + testthat (>= 3.0.0), tidyr, tidytext, withr @@ -45,3 +45,4 @@ LazyData: TRUE LazyDataCompression: xz Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2 +Config/testthat/edition: 3 diff --git a/R/gutenberg_mirrors.R b/R/gutenberg_mirrors.R index 0420836..bc9e704 100644 --- a/R/gutenberg_mirrors.R +++ b/R/gutenberg_mirrors.R @@ -73,7 +73,7 @@ gutenberg_get_mirror <- function(verbose = TRUE) { gutenberg_get_all_mirrors <- function() { mirrors_url <- "https://www.gutenberg.org/MIRRORS.ALL" mirrors <- suppressWarnings( # Table has extra row that causes vroom warning - readMDTable::read_md_table(mirrors_url, warn = FALSE) |> + readMDTable::read_md_table(mirrors_url, warn = FALSE, show_col_types = FALSE) |> dplyr::slice(2:(dplyr::n() - 1)) ) diff --git a/tests/testthat/test-metadata.R b/tests/testthat/test-metadata.R index cf402d8..4301db2 100644 --- a/tests/testthat/test-metadata.R +++ b/tests/testthat/test-metadata.R @@ -60,8 +60,8 @@ test_that("All four datasets have a date-updated", { d3 <- attr(gutenberg_authors, "date_updated") d4 <- attr(gutenberg_languages, "date_updated") - expect_is(d1, "Date") - expect_is(d2, "Date") - expect_is(d3, "Date") - expect_is(d4, "Date") + expect_s3_class(d1, "Date") + expect_s3_class(d2, "Date") + expect_s3_class(d3, "Date") + expect_s3_class(d4, "Date") })