Please move all of the create_sinon calls out of beforeEach. We have had sporadic test failures with sinon setup/cleanup done outside of the individual test methods because sometimes one unit test gets linked as the parent of another. If they are both using sinon, bad things can happen (if setup/cleanup happens in beforeEach and afterEach). I implemented the pattern of using create_sinon only inside individual test points as a workaround.

For the gory details, see the comment at the top of create_sinon and the associated JIRA record.

(As a side note, I'm not sure if the cleanup would happen properly if you call create_sinon inside a beforeEach, as it is being done with "after". I could stop in the debugger to see, but I still don't think it is a good idea because the beforeEach may get called before unrelated test methods if the parenting bug is hit.)