with_mock_api will look for mocks relative to the current
working directory (or the test directory). If you want to look in other
places, you can call
.db_mock_paths to add directories to the search path.
Either a character vector of path(s) to add, or
new is omitted, the function returns the current search paths, a
character vector. If
new is provided, the updated value will be returned
It works like
base::.libPaths(): any directories you specify will be added
to the list and searched first. The default directory will be searched last.
Only unique values are kept: if you provide a path that is already found in
.db_mock_paths, the result effectively moves that path to the first
For finer-grained control, or to completely override the default behavior of searching in the current working directory, you can set the option "dittodb.mock.paths" directly.
This function is similar to