It is currently very hard to track down such leaked stubs, when they happen, as they might be created in one test and cause an exception dozens of tests later.
By including the name of the test that invalidated them, it makes the debugging process a bit easier.
Note, I made setup also accept the current test instance purely for consistency with teardown but it's not strictly necessary.
Based on #641 and thanks to @casperisfine.
It is currently very hard to track down such leaked stubs, when they happen, as they might be created in one test and cause an exception dozens of tests later.
By including the name of the test that invalidated them, it makes the debugging process a bit easier.
Note, I made
setup
also accept the current test instance purely for consistency withteardown
but it's not strictly necessary.