moving test spy assignment up to setup