check_via_read | R Documentation |
check whether a writen correct file is equivalent to a writen one produced by strcode
check_via_read(directory = "test-dir_in",
filename = "code_summary-example-1", path_start)
directory |
A path relative to "tests/testthat" |
filename |
The name of a file to check. The name of the file to check
against is |
path_start |
A string specifiing the location of of testthat relative to the project root. See details |
When testing is performed manually (that is, not via test routine
of RStudio), reading in files needs a directory relative to the project
main directory. When running tests via RStudio, the directory must be
indicated relative to the testthat folder. Hence, for manual testing,
we need a different path than for routine testing. The problem can be
solved by assigning a global variable to path_start manually plus setting
path_start to NULL
at the beginning of the document, so when the
tests are run via the RStudio routine, they are set correctly.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.