If you would like to use dittodb
in your package, and you are already using
testthat, use this function to
add dittodb
to Suggests in the package DESCRIPTION and loads it in
tests/testthat/helper.R
. Call it once when you're setting up a new package
test suite.
Details
This function should be called with the path to your package source as the
path
argument. The function is idempotent: if dittodb
is already added to
these files, no additional changes will be made.
It will:
add
dittodb
to theSuggests
field of the DESCRIPTION file in the current working directoryadd
library(dittodb)
to the filetests/testthat/helper.R
(creating it if it doesn't already exist)