Fixes #37422 - Switch to method definition in template generators
Mocha cannot be used in rake tasks like `rake snapshots:generate`
Fixes #37422 - Switch to method definition in template generators
Mocha cannot be used in rake tasks like `rake snapshots:generate`