2 ms·
Most people 'spike' an initial version to discover what they have to do. It is very hard to test drive something when you have no clue how it is going to work.
by nahname 14y ago
Most people 'spike' an initial version to discover what they have to do. It is very hard to test drive something when you have no clue how it is going to work. Could you test drive the code for the very first controller action you ever wrote? No. But the second controller action should be easy to TDD.
- kamaal 14y agoSorry when I look at a problem, I think about the solution for the problem. And not testing the solution.
- nahname 14y agoI am not sure how they are mutually exclusive. You are going to test that your solution works. Switching from manual confirmation to automatic confirmation isn't so difficult. The real trick is figuring out your expectations before you write you code. Which makes sense when you think about it. When this code works, I will see the username show up in the view. Versus. assigns(:username).should == "expected" I realize this example is trivialized, but these are the usually examples people start with when they are learning how to start with tests instead of code.