| Rails411 |
| How To Do Test Driven Development In Rails |
|
In a nutshell, test-driven development means writing tests before you start the implementation of a piece of functionality. From the (excellent) book, Agile Web Development with Rails – “Think of it as a specification for how you want the code to work. When the test passes, you know you’re done coding. Better yet, you’ve added one more test to the application.” Here is how I would go about this process in Rails. I’ll be taking the example of a simple user authentication system controller. At this point, you haven’t thought of any of the specifics, just a vague idea of what you want. |
|
|