Skip to content

Commit d6c4b1d

Browse files
authored
test-fixtures.Rmd exists/exits typo (#1765)
This accidentally implies the opposite of what it means.
1 parent 4588502 commit d6c4b1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vignettes/test-fixtures.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ neater <- function(x, sig_digits) {
163163
neater(pi)
164164
```
165165

166-
This code doesn't work because the cleanup happens too soon, when `local_digits()` exists, not when `neat()` finishes.
166+
This code doesn't work because the cleanup happens too soon, when `local_digits()` exits, not when `neat()` finishes.
167167

168168
Fortunately, `withr::defer()` allows us to solve this problem by providing an `envir` argument that allows you to control when cleanup occurs. The exact details of how this works are rather complicated, but fortunately there's a common pattern you can use without understanding all the details. Your helper function should always have an `env` argument that defaults to `parent.frame()`, which you pass to the second argument of `defer()`:
169169

0 commit comments

Comments
 (0)