Commit adb2ebf
authored
Tweak how httr2 mocking function is set (#141)
There's no need to use `local_` here since you're not setting it locally and this avoids a slightly confusing message from withr:
```R
webmockr::enable()
#> CrulAdapter enabled!
#> HttrAdapter enabled!
#> Httr2Adapter enabled!
#> Setting global deferred event(s).
#> i These will be run:
#> * Automatically, when the R session ends.
#> * On demand, if you call `withr::deferred_run()`.
#> i Use `withr::deferred_clear()` to clear them without executing.
```
(In principle, it would be better if webmockr could restore the previous state prior to its mocking, but it's not a big deal given that there are very few other tools that do web mocking).1 parent ccd9398 commit adb2ebf
1 file changed
+1
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
| 104 | + | |
108 | 105 | | |
109 | | - | |
110 | 106 | | |
111 | 107 | | |
112 | 108 | | |
| |||
0 commit comments