Scope the spies so that context of this can be changed during testing