Fix deprecated RSpec mock.