balderdashy/sails — pull request #446 by dasher (2013-06-08 21:38:36+00:00)
Title: First run at geneating tests.  

Currently this works for controllers.

You can run: 'sails generate test ' to generate tests for all actions in a controller.
Supports 'sails generate test --force' to overwrite the test.
Optionally you can use 'sails generate test actionOne ActionTwo' to only generate tests for those actions - actions are checked to ensure they exist.

Todo:
1) Better base tests - the current ones depend on the view actually existing and the default routes (as listed in the controller when generated) to work
2) Some form of require in tests that allow users to write their own tests for controllers - and for generated tests to still work. ie: sails generate test controller to be run multiple times without destroying any extra tests created by users.
3) Grunt helpers for running tests
4) bringing tests fully into the dev experience - with some kind of base for viewing tests & their results in the browser. Make it pretty, give 'em metrics & coverage and they'll drool