Rewrite spy specs to use the spy method