hadley/devtools — pull request #649 by Geoff99 (2014-11-16 01:50:28+00:00)
Title: Test for pull request #648 (related to issue #623) - calling roxygen2::update_collate in load_all

This proposal is to add a testthat `load_all` is aware of and uses any `@include` directives in the code for the package being loaded.

It is related to issue #623 and a proposed fix in pull request #648.

Due to my inexperience with git the code from pull request #648 is also included. If that causes problems, please let me know and I will sort it out. Pls see the caveat in PR #648 which should not be applied until issue klutometis/roxygen#302 has been resolved (see PR klutometis/roxygen#303 and PR klutometis/roxygen#304 for proposed fixes).

The testthat uses a copy of the template package (`testCollateOrder`) in `tempdir()` created using a utility function `temp_copy_pkg`. Working on a copy insulates the test package template from any permanent side effects of `roxygen2::update_collate` (viz changing the DESCRIPTION file).

I contemplated placing `temp_copy_pkg` in utils.r, and amending a number of the other testthats in the devtools test suite to work off copies of their test package templates as a safety measure, but decided I was getting (way) too far ahead of myself, and should seek comment and feedback on the pull requests I have submitted before doing anything else.

Geoff