Fix deprecated rspec call

`mock` has been deprecated.

This change makes the tests run with no warnings.