Skip to content

Instantly share code, notes, and snippets.

@elmendalerenda
Last active August 26, 2016 09:58
Show Gist options
  • Save elmendalerenda/0c8b7e42f1f1970be41abfd87dbbe11d to your computer and use it in GitHub Desktop.
Save elmendalerenda/0c8b7e42f1f1970be41abfd87dbbe11d to your computer and use it in GitHub Desktop.
sample for medium article
it 'calls remote service' do
expect(RemoteServices).to receive(:request_recognize)
.with('88.wav')
.and_return({result: 'ochenta y ocho'}.to_json)
result = VoiceService.recognize('88.wav')
expect(result).to eql('ochenta y ocho')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment