Tháng Tư 3, 2009
Instead of several steps, there is now two steps:
It installs all assets, gives you a
script/js_autotest, and finally (and most importantly), creates the
application_test.html test stub.
As always, you can also run a single test file by loading it into a browser.
Previously, the test suite – unittest.js – had a dependency on prototypejs. This was wonderful if you’re developing in prototypejs, but could cause some grief if you weren’t.
Merb et al support
I wrote a rails generator because I used Rails. If a merb/other framework (Ruby or non-Ruby) wants a similar generator, just ask. Its pretty simple – I copy over the
rails_generators folder into a
merb_generators folder in
newjs and change some things based on your frameworks’ structure.
Alternate test suite support
If you like another test suite, and want it included in the generators, this might require some additional effort on your part. It probably has different mechanisms for launching runners etc; whereas I was able to steal the rake tests + support libraries from prototypejs. But, it can be done.