Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document text fixtures pattern #1042

Closed
hadley opened this issue Jun 16, 2020 · 1 comment · Fixed by #1097
Closed

Document text fixtures pattern #1042

hadley opened this issue Jun 16, 2020 · 1 comment · Fixed by #1097

Comments

@hadley
Copy link
Member

hadley commented Jun 16, 2020

https://www.tidyverse.org/blog/2020/04/self-cleaning-test-fixtures/

Per #1021, show how to use for a whole file, but talk about the downsides — non-locality makes it harder to debug. Emphasise fixtures over setup() and teardown()

@hadley
Copy link
Member Author

hadley commented Jun 25, 2020

Could we make package scoped fixtures easier to write by providing an hook to access an appropriately scoped environment?

hadley added a commit that referenced this issue Jul 14, 2020
hadley added a commit that referenced this issue Jul 14, 2020
* Write test fixtures vignette. Fixes #1042.
* Superseed setup() and teardown()
* Deprecate setup() and teardown() in 3rd edition
* Implement teardown_env() for package scoped fixtures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant