jeudi 23 juin 2016

Stub a method on any instance of object

How can I stub a method of an object that is hardcoded in app? In rspec there is a method allow_any_instance_of.

I can't reverse the dependency, the initialisation of the object should still be hardcoded.

Aucun commentaire:

Enregistrer un commentaire