Skip to content

Commit 6d0ad9f

Browse files
committed
Still more words
1 parent 9366d4f commit 6d0ad9f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

vignettes/challenging-tests.Rmd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ Sometimes part of the output varies in ways that you can't easily control. There
153153

154154
## Mocking
155155

156+
Mocking is a useful technique when all else fails: for the duration of your test, you make some function return whatever you need it to.
157+
158+
Note that mocking works best on your own functions and functions that you import. But it's possible to mock base R functions and functions that you don't import. See `?local_mocked_bindings` for more details.
159+
156160
<!-- https://github.com/search?q=%28org%3Ar-lib+OR+org%3Atidyverse%29+local_mocked+bindings+path%3Atests%2Ftestthat&type=code -->
157161

158162
* Package versions and installed status

0 commit comments

Comments
 (0)