Description
Adds lifecycle hooks to Minitest test suites so setup and cleanup can wrap groups of tests. It is useful when tests need shared resources, expensive initialization, or behavior around a full group.
Shared hooks can leak state between tests. Keep cleanup reliable, avoid hidden ordering dependencies, and isolate databases, files, and network resources.