Hi,
here is my first contribution to Cuis!
Attached are two CS with support for TDD. Why two? because I have no idea how to move changes from one change set to another neither how to create a package :-)
Anyway, install them and run: Editor initialize
This will add two options on the code menu:
A) Accept & Run Tests in Class (t)
B) Accept & Run Tests in Category (y)
Both do the following:
1) Saves the method
2) If the method is a test, runs it and if there is an error opens the debugger to solve the error
3) After running the method succesfully, if option A) was chosen, runs all tests in the method class, if B) was chosen runs all tests in the category of the method class
4) If all tests of 3) passed, flashes the code editor with a green color. If not, an inspector will be open with a test result wrapper that shows the test that error and fail, one per line string representation of the object that allows you to easily debut the test just pressing cmd+d over the line. Also the message #reRun can be send to self and it will rerun all tests and show only the new errors and failures... it is the easies UI that I could think of ...
If the method being saved is not a test, it does not run that method but it runs the class's tests or category's tests. The same happens if cmd+t or cmd+y is pressed in a class that is not a test case. This is a very easy way to run tests.
For sure ther is place for improvements in the implementation and also in the functionality...
Let me know what you think!
Hernan.
--
Hernán Wilkinson
Agile Software Development, Teaching & Coaching
Phone: +54-011-4893-2057
Twitter: @HernanWilkinson
Address: Alem 896, Floor 6, Buenos Aires, Argentina