I have been introduced to a project at work that uses R along with some other languages in a simple reporting tool. I'd like to add some tests to the R code for all the good stuff that tests give you.
I've found using testthat to be a great experience when developing R packages. I think the natural answer to this problem is to package the R code, and use the package in the reporting tool. The package can then be tested, documented, etc separately and easily.
Although I think this is the best long term solution, separating out the R code and packaging it would take time from other, more pressing projects. So I'm wondering if there's a quick win to be had in the short term by introducing tests to the project as it is. I'm also interested in hearing more about people's approaches to testing generally.
Has anyone found a successful way to test R scripts/code outside of package development?