dimanche 26 juillet 2015

ReactiveCocoa: How do you unit test a RACCommand?

In MVVM pattern, ViewModel give out a RACCommand and View bind a button with the RACCommand, but how to test the RACCommand?

I have two aspects that needs to be tested:

  • under some conditions, the RACCommand should be enabled
  • fire that command and see if the ViewModel does its job when the command fires

How to test these cases?

Aucun commentaire:

Enregistrer un commentaire