lundi 30 mai 2016

Can I fake calling methods in Ruby tests?

I'm running some tests on my Ruby code, but the method I'm testing calls a function in an external library responsible for sending push notifications. I want the calls it makes to be 'faked', so they don't actually get called. It'd also be helpful if they could return a standard response, or yield with a standard response. Is there any way to do this?

Aucun commentaire:

Enregistrer un commentaire