tests/testthat/test-check_ohvbd_config.R

test_that("configuration changes are correctly detected", {
  withr::with_options(
    list(ohvbd_compat = NULL),
    expect_false(suppressMessages(check_ohvbd_config()))
  )
  withr::with_options(
    list(ohvbd_compat = TRUE),
    expect_true(suppressMessages(check_ohvbd_config()))
  )
  withr::with_options(
    list(ohvbd_compat = FALSE),
    expect_true(suppressMessages(check_ohvbd_config()))
  )
  withr::with_options(
    list(tmp_test_option = TRUE),
    expect_true(suppressMessages(check_ohvbd_config("tmp_test_option")))
  )
})

Try the ohvbd package in your browser

Any scripts or data that you put into this service are public.

ohvbd documentation built on March 10, 2026, 1:07 a.m.