Refactor specs to use test spies