tinytest (version 1.4.1)

setup_tinytest: Add tinytest to package source directory

Description

Creates inst/tinytest, and an example test file in that directory. Creates tests/tinytest.R so the package is tested with R CMD check. Adds tinytests as a suggested package to the DESCRIPTION.

Usage

setup_tinytest(pkgdir, force = FALSE, verbose = TRUE)

Value

NULL, invisibly.

Arguments

pkgdir

[character] Package source directory

force

[logical] Toggle overwrite existing files? (not folders)

verbose

[logical] Toggle print progress

Note on <code>DESCRIPTION</code>

Fails when it does not exist. It is assumed that the package is named in the DESCRIPTION.

Examples

Run this code
if (FALSE) {
# an easy way to set up a package 'haha' that passes
# R CMD check
pkgKitten::kitten("haha")
tinytest::setup_tinytest("haha")
}

Run the code above in your browser using DataLab