We should give users (and ourselves) the ability to override function variables that use get_package_scope_var, namely DB connection objects so that we can easily use in-memory databases while testing, rather than having to load a separate .env file for testing.
Its use in logging.R might be more suited to overriding the package scoped log_con, we wouldn't typically be running log_job_* functions during testing.
We should give users (and ourselves) the ability to override function variables that use
get_package_scope_var
, namely DB connection objects so that we can easily use in-memory databases while testing, rather than having to load a separate.env
file for testing.Updates would follow this template:
Relevant places that
get_package_scope_var
is called:https://github.com/search?q=repo%3Actsit/redcapcustodian%20get_package_scope_var&type=code
I think this one makes the most sense to update:
Its use in
logging.R
might be more suited to overriding the package scopedlog_con
, we wouldn't typically be runninglog_job_*
functions during testing.