Test blocks are not run immedietly, they will be run when the done_testing() function is called.
You can run a specific codeblock using the $T2_WORKFLOW variable, which takes either a name or a line number.
|Do not render block as a subtest
|Mark entire block as TODO
|Do not run the block, generate skip event
|Isolate test by forking or spawning a new thread
|Test can be run concurrently (but does not have to be)
You can combine any number of these at once.
Test2::Tools::Spec is smart with Test2::Tools::Mock. It treats a mock in void context as a before_each (roughly).
Test2::Plugin::SpecDeclare provides nice syntax sugar: