Take the examples written in your documentation of functions and use them to create shells (skeletons which must be manually completed by the user) of test files to be tested with the 'testthat' package. Sort of like python 'doctests' for R.
exampletestr
1.4.1tempdir()
needed to be tempdir(check = TRUE)
.
check
option appeared in tempdir()
).exampletestr
1.4.0pkgdown
site at https://rorynolan.github.io/exampletestr/index.html.usethis
package.usethis
instead of relying on devtools
for things that are now implemented in usethis
.exampletestr
1.3.1styler
and filesstrings
.exampletestr
1.3.0make_test_shell_fun()
for making test shells one function at a time. This is thanks to a suggestion by Lorenz Walthert: https://github.com/rorynolan/exampletestr/issues/6.rprojroot
package.exampletestr
1.2.0exampletestr
now names its test files in the same way as usethis::use_test()
.exampletestr
1.1.1exampletestr
1.1.0testthat::context()
to test shells.filesstrings
v2.0.0.exampletestr
1.0.1exampletestr
1.0.0exampletestr
0.5.0usethis::use_testthat()
, now this is just done for you.exampletestr
0.4.2exampletestr
0.4.1exampletestr
0.4.0expect_equal()
statements by default.roxygen2
tags.exampletestr
0.3.1exampletestr
0.3.0