You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: vignettes/test-fixtures.Rmd
+1-3Lines changed: 1 addition & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ library(testthat)
45
45
46
46
## `local_` helpers
47
47
48
-
We'll begin by giving you the bare minimum knowledge to change global state *just* within your test. The withr package provides a number of functions that temporarily change the state of the world, carefully undoing the changes when the current function finishes:
48
+
We'll begin by giving you the bare minimum knowledge to change global state *just* within your test. The withr package provides a number of functions that temporarily change the state of the world, carefully undoing the changes when the current function or test finishes:
This is particularly useful when you need to chain together multiple `local_` functions to achieve the desired state.
86
-
87
85
## Foundations
88
86
89
87
Before we go further, let's lay some foundations to help you understand how `local_` functions work. We'll motivate the discussion with a `sloppy()` function that prints a number with a specific number of significant digits by adjusting an R option:
0 commit comments