Test Fixtures
When it’s not practical to make your test entirely self-sufficient.
- Put repeated code in a constructor-type helper function.
- If the repeated code has side effects make sure to clean up afterwards by writing a custom local_*().
- Otherwise save the result as a static file and load it.