source helper scripts in test environment when running `test_file` #350
Comments
Can you use |
That's a good work-around, thanks for that. I think I'd still argue for |
That sounds reasonable to me |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have test harness data and functions in a
helper-base.R
file intests/testthat/
, andtest_file
seems to rely on this beingsource
d manually, whereastest_package
sets up a clean test environment.Sourcing
helper-base.R
is a work-around, but pollutes the global environment, and I think it would be more consistent and simpler fortest_file
to source it for the user in a test environment.The text was updated successfully, but these errors were encountered: