Note: I couldn't add this in the `before` block because there are some tests which don't actually call the generator (thus `#invoke_all` is never called). I thought this was simpler than creating a whole new context and trying to force-group things.