revise spy function in UISpec