A blog about the problems I've encountered while being a Ruby on Rails developer, and how I've solved them.
Friday, February 27, 2015
Stubbing Global Methods in JS Specs with Sinon
In your Rails app, your JS should be tested too! Setting that up is a topic for another post. When testing your JS, a lot of the same philosophies apply. One of those is mocking methods other than the one you're testing. How do you do this for methods in other libraries, such as vanilla JS or jQuery?