you don't need this, you only need to store a boolean saying "ok, `render` was called", and check this from the test.