Mock file
Arguments
- path
(character) a file path. required
- payload
(character) string to be written to the file given at
path
parameter. required
Examples
mock_file(path = tempfile(), payload = "{\"foo\": \"bar\"}")
#> <mock file>
#> path: /tmp/RtmpaKelNM/file346200bc0fe
#> payload: {"foo": "bar"}