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/RtmpSXENeW/file3144bf1873e
#> payload: {"foo": "bar"}