Skip to content

Commit 3868b36

Browse files
committed
Deploying to gh-pages from @ 7e39ff1 πŸš€
1 parent 7562653 commit 3868b36

File tree

10 files changed

+19
-17
lines changed

10 files changed

+19
-17
lines changed

β€Ždev/articles/custom-expectation.htmlβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Ždev/articles/custom-expectation.mdβ€Ž

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,10 @@ The key challenge is that
398398
[`fail()`](https://testthat.r-lib.org/dev/reference/fail.md) captures a
399399
`trace_env`, which should be the execution environment of the
400400
expectation. This usually works because the default value of `trace_env`
401-
is `caller_env()`. But when you introduce a helper, you’ll need to
402-
explicitly pass it along:
401+
is
402+
[`rlang::caller_env()`](https://rlang.r-lib.org/reference/stack.html).
403+
But when you introduce a helper, you’ll need to explicitly pass it
404+
along:
403405

404406
``` r
405407
expect_length_ <- function(act, n, trace_env = caller_env()) {

β€Ždev/articles/mocking.htmlβ€Ž

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Ždev/articles/mocking.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ function to mock.
292292
``` r
293293
unix_time <- function() unclass(Sys.time())
294294
unix_time()
295-
#> [1] 1763975896
295+
#> [1] 1763976105
296296
```
297297

298298
Now I’m going to create a function factory that makes it easy to compute
@@ -309,7 +309,7 @@ elapsed <- function() {
309309
timer <- elapsed()
310310
Sys.sleep(0.5)
311311
timer()
312-
#> [1] 0.5019052
312+
#> [1] 0.5019979
313313
```
314314

315315
Imagine trying to test this function without mocking! You’d probably

β€Ždev/articles/snapshotting.htmlβ€Ž

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Ždev/articles/snapshotting.mdβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ test_that("generates actionable error message", {
386386
#> safe_write_lines(letters, path)
387387
#> Condition
388388
#> Error in `safe_write_lines()`:
389-
#> ! '/tmp/RtmpAdPADg/file26396b9757a0' already exists.
389+
#> ! '/tmp/RtmpVqjUmn/file26255e5cbdda' already exists.
390390
#> i Set `overwrite = TRUE` to overwrite
391391
#> Test passed with 1 success 🎊.
392392
```
@@ -402,8 +402,8 @@ test_that("generates actionable error message", {
402402
#> safe_write_lines(letters, path)
403403
#> Condition
404404
#> Error in `safe_write_lines()`:
405-
#> - ! '/tmp/RtmpAdPADg/file26396b9757a0' already exists.
406-
#> + ! '/tmp/RtmpAdPADg/file26393ede6914' already exists.
405+
#> - ! '/tmp/RtmpVqjUmn/file26255e5cbdda' already exists.
406+
#> + ! '/tmp/RtmpVqjUmn/file26253872c087' already exists.
407407
#> i Set `overwrite = TRUE` to overwrite
408408
#> * Run `testthat::snapshot_accept("snapshotting.Rmd")` to accept the change.
409409
#> * Run `testthat::snapshot_review("snapshotting.Rmd")` to review the change.

β€Ždev/pkgdown.ymlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ articles:
1111
special-files: special-files.html
1212
test-fixtures: test-fixtures.html
1313
third-edition: third-edition.html
14-
last_built: 2025-11-24T09:17Z
14+
last_built: 2025-11-24T09:21Z
1515
urls:
1616
reference: https://testthat.r-lib.org/reference
1717
article: https://testthat.r-lib.org/articles

β€Ždev/reference/expect_snapshot_file.htmlβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Ždev/reference/expect_snapshot_file.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ save_png <- function(code, width = 400, height = 400) {
129129
}
130130
path <- save_png(plot(1:5))
131131
path
132-
#> [1] "/tmp/Rtmpmby43L/file18f645a7a800.png"
132+
#> [1] "/tmp/Rtmpvb88Go/file18e56d534d09.png"
133133

134134
if (FALSE) { # \dontrun{
135135
expect_snapshot_file(save_png(hist(mtcars$mpg)), "plot.png")

β€Ždev/search.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
Β (0)