Then make the first line this:

``` ruby
expect_any_instance_of(Object).to receive(:foo).twice
```