Is there a way to easily reset all sinon spys mocks and stubs that will work cleanly with mocha's beforeEach blocks.
I see sandboxing is an option but I do not see how you can use a sandbox for this
beforeEach ->
sinon.stub some, 'method'
sinon.stub some, 'mother'
afterEach ->
# I want to avoid these lines
some.method.restore()
some.other.restore()
it 'should call a some method and not other', ->
some.method()
assert.called some.method
See Question&Answers more detail:os