Sunday, July 28, 2013

Testing JavaScript in Rails, with some help from Mark Bates

Mark Bates visited Tel-Aviv and lectured about the importance of testing your client side code (obvious) using Mocha and Chai.
I went home and found online the following posts by Mark (part1, part2) that explain how to setup a testing environment for the JavaScript in your rails application.
I followed it and, apart from some struggling with installing PhantomJS (not because it's hard, just because I'm not very smart and it took me a while to understand that I need to copy the new executable I downloaded on top of /usr/bin/phantomjs) it works!

And here is a proof:

Thank you Mark!

No comments:

Post a Comment