How can I stub a method of an object that is hardcoded in app? In rspec there is a method allow_any_instance_of.
allow_any_instance_of
I can't reverse the dependency, the initialisation of the object should still be hardcoded.
Aucun commentaire:
Enregistrer un commentaire