Fixing RSpec deprecation warning 'mock is deprecated. Use double instead.'