fix(mocks): always call functions injected with `inject` with `this` set to the current spec

Currently when a function is injected inside of a test we set the context to undefined which
is a bug.

Closes #6102