unit testing - Include tests in binary R package -


i using testthat write unit tests r packages. have seen few package authors (like rcpp , ggplot2) distributing unit tests binary files. however, when build packages rstudio (0.98.1102) , devtools (1.7.0) tests folder not included in zip file. have add folder manually or possible done automatically setting option?

btw: on win7 machine using r v3.1.2 , rtools v3.1.0.1942.

ha! got it. found information on github page of testthat (it's @ bottom). https://github.com/hadley/testthat

the advantage of new structure user has control on whether or not tests installed using --install-tests parameter r cmd install, or install_opts = "--install-tests" argument install.packages(). i'm not sure why wouldn't want install tests, have option.

the command build binary package tests is

devtools::build(binary=true,args=c("--preclean","--install-tests")) 

Comments