@@ -23,17 +23,18 @@ library(rstudioapi)
2323
2424## Overview
2525
26- Testthis provides tools to make unit testing in R more comfortable. It is
26+ Testthis contains tools to make unit testing in R more comfortable. It is
2727designed to complement the packages ** testthat** , ** devtools** and ** usethis** .
2828
2929
3030
31-
3231## RStudio addins
3332
34- Provides RStudio addins for common tasks, that can also be assigned to hotkeys.
35- I recommend assigning ` ctrl+alt+Insert ` , ` ctrl+alt+Pos1 ` and ` ctrl+alt+PageUp `
36- to the following functions (under * Tools/Modify Keyboard Shortcuts* ):
33+ Testthis provides RStudio addins for common tasks. These can be called like
34+ normal R function, but it is also possible to assigned to hotkeys to them in
35+ RStudio (* Tools/Modify Keyboard Shortcuts* ). I recommend assigning
36+ ` ctrl+alt+Insert ` , ` ctrl+alt+Pos1 ` and ` ctrl+alt+PageUp ` to the following
37+ functions:
3738
3839* ` test_this() ` : Run tests associated with the currently open R script file.
3940* ` lest_this() ` : "Load and test"; As above, but call ` devtools::load_all() ` first
@@ -46,15 +47,15 @@ to the following functions (under *Tools/Modify Keyboard Shortcuts*):
4647The functions above assume that if the current filename is ` currentfile.R ` ,
4748the associated test file is ` /tests/testthat/test_currentfile.R ` . If you want
4849to modify this behaviour you can put the tag ` #* @testfile anotherfile ` anywhere
49- in your code, usually the top or bottom of your .R file. Each R script can only
50+ in your code, usually the top or bottom of your ` .R ` file. Each R script can only
5051have a single associated testfile.
5152
5253The following example will associate the file ` /tests/testthat/other_test_file.R `
5354instead of ` /tests/testthat/test_open_testfile.R ` with ` R/open_testfile ` :
5455``` {r eval = FALSE}
5556# file R/open_testfile.R
56- #* @testfile other_testfile
5757
58+ #* @testfile other_testfile
5859open_testfile <- function(){
5960 fname <- get_testfile_name()
6061
0 commit comments