Skip to content

Commit 19d57be

Browse files
authored
Update with_mocked_responses to use new name in docs (#715)
1 parent 50c5545 commit 19d57be

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

R/req-mock.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#'
1818
#' @param code Code to execute in the temporary environment.
1919
#' @param env Environment to use for scoping changes.
20-
#' @returns `with_mock()` returns the result of evaluating `code`.
20+
#' @returns `with_mocked_responses()` returns the result of evaluating `code`.
2121
#' @export
2222
#' @examples
2323
#' # This function should perform a response against google.com:
@@ -30,7 +30,7 @@
3030
#' my_mock <- function(req) {
3131
#' response(status_code = 403)
3232
#' }
33-
#' try(with_mock(my_mock, google()))
33+
#' try(with_mocked_responses(my_mock, google()))
3434
with_mocked_responses <- function(mock, code) {
3535
mock <- as_mock_function(mock)
3636
withr::with_options(list(httr2_mock = mock), code)

man/with_mocked_responses.Rd

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)