vendredi 8 juin 2018

Testing a job in Dashing

I am building an application with Dashing/Smashing right now, and I am using rspec to test my code. However, I cannot figure out how to check that send_event is called. I have tried

expect(Sinatra::Application).to receive(:send_event).twice

and

expect(Dashing).to receive(:send_event).twice,

but neither have worked. I am not sure what object is supposed to receive the call to send_event since it lies inside Dashing in app.rb. There is also this issue, talking about the same thing, unanswered on the Dashing GitHub.

Any advice on how to do this would be much appreciated. Thank you!

Aucun commentaire:

Enregistrer un commentaire