tests/testthat/test-utils.R

test_that("create_if_not works", {

  # Test creating new
  expect_warning(
    create_if_not(
      file.path(tempdir(), "junk_directory")
    ),
    NA
  )

  # Test with existing
  expect_warning(
    create_if_not(
      file.path(tempdir(), "junk_directory")
    ),
    NA
  )
})
mikemahoney218/unifir documentation built on Feb. 8, 2024, 11:02 a.m.