R/mock_file.R
mock_file.Rd
Mock file
mock_file(path, payload)
(character) a file path. required
(character) string to be written to the file given at path parameter. required
path
a list with S3 class mock_file
mock_file
mock_file(path = tempfile(), payload = "{\"foo\": \"bar\"}") #> <mock file> #> path: /tmp/RtmpjnmFnF/file3e86107cce1b55 #> payload: {"foo": "bar"}