Autotesting JavaScript in Rails
Date : 2008 01 04 Category : Tech & DevelopmentDr Nic has written a tutorial on testing JavaScript in Rails using a new javascript_test plugin.
Once you ruby script/plugin install javascript_test you can ruby script/generate javascript_test maths. Then you can write a test a la:
PLAIN TEXT JAVASCRIPT:testTruth: function() { with(this) { assert(true); }}
You can go further though with the autotest watching over files, and Nic shows some TDD in action.
