tests/testthat/test-once.R

context("Once")

test_that("renv_once() returns TRUE only once", {

  method <- function() {
    expect_true(renv_once())
    expect_false(renv_once())
    expect_false(renv_once())
  }

  method()
  expect_error(method())

})
slopp/renv documentation built on July 6, 2019, 12:08 a.m.