Fix deprecation warnings when running specs

"DEPRECATION: mock is deprecated. Use double instead."