Make it easier to write test cases that reset mocks
Often a function tested with mocks may have multiple behaviors that need to be tested and which require mocks be set up in different ways. mock-reset! and with-mock-behavior provide building blocks for doing this, but it can be clunky as every test case needs to remember to reset mocks at the end to ensure it doesn't affect other test cases. A handful of forms that create RackUnit test cases which automatically reset all mocks in a function at the end of the test would be very useful.
with-mocks helps with this significantly, but it's still wordy to 1) construct a test case, 2) bring mocks into scope with with-mocks, and 3) change mock behaviors. A form for doing all three of these would be nice. Idea:
(test-case/mocks "Some test"
#:mocks some-proc
#:behavior some-mocked-proc other-behavior
test ...)
This syntax generalizes to test-equal?/mock and the various other test case sugar forms.