View source: R/stub_registry.R
stub_registry | R Documentation |
List stubs in the stub registry
stub_registry()
an object of class StubRegistry
, print method gives the
stubs in the registry
Other stub-registry:
StubRegistry
,
remove_request_stub()
,
stub_registry_clear()
# make a stub
stub_request("get", "https://httpbin.org/get") %>%
to_return(body = "success!", status = 200)
# check the stub registry, there should be one in there
stub_registry()
# make another stub
stub_request("get", "https://httpbin.org/get") %>%
to_return(body = "woopsy", status = 404)
# check the stub registry, now there are two there
stub_registry()
# to clear the stub registry
stub_registry_clear()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.