diff --git a/tests/testthat/test-unclean_column_names.R b/tests/testthat/test-unclean_column_names.R index e32ae07d..43faa799 100644 --- a/tests/testthat/test-unclean_column_names.R +++ b/tests/testthat/test-unclean_column_names.R @@ -1,4 +1,4 @@ -library(dplyr) +library(dplyr, warn.conflicts = FALSE) test_that("reverses the effect of janitor::clean_names", { data <- tibble(x.x = 1, y = 1, z.z = 1) diff --git a/tests/testthat/test-write_csv_file.R b/tests/testthat/test-write_csv_file.R index e3bf6a87..e319adc9 100644 --- a/tests/testthat/test-write_csv_file.R +++ b/tests/testthat/test-write_csv_file.R @@ -1,7 +1,13 @@ test_that("with readr < 1.4.0 and named argument `file` throws no error", { - skip_if(utils::packageVersion("readr") >= "1.4.0") + # Avoid verbose message of `skip_if()` + if (!utils::packageVersion("readr") >= "1.4.0") { + x <- tibble::tibble(x = 1) + file <- tempfile() - x <- tibble::tibble(x = 1) - file <- tempfile() - expect_error(write_csv_file(x = x, file = file), NA) + none <- NA + expect_error(write_csv_file(x = x, file = file), none) + } + + # Avoid message "Reason: empty test" + expect_true(TRUE) })