@Felipe_Espinoza, the best time to start with TDD is now.
You’re in a great position to do some outside-in development. Start with a simple feature (“user logs in and sees their name”), and write the cucumber, turnip, or rspec test for the feature. Something like
As a user of the site
In order to access the app
I want to be able to log in
Given a signed-up user
When I go to the sign up page
And I enter my email
And I enter my password
And I click "Sign in"
Then I should be at the private home page
And the page should have my email
For most scenarios you won’t want to be as granular about signing in, but it’s nice to do this once for this case.
You’ll fail this test because you haven’t written the steps yet. That’s expected. You’ll write the steps one by one, and get a failing test after you create it. At certain points in this process, you’ll have to start doing some mroe fleshed out logic in models or controllers. Whenever you feel that the component you’re testing is messier (has more paths or conditionals) than the integration test is exposing, that’s a good time to move “inside” and do some unit testing. I find that my instinct takes me to do more unit testing, so I have to force myself to slow down and think about the feature I’m building as a whole and ensure I’m actually testing the feature and not just some interesting little unit piece of the whole.
@cpytel did an interview recently where (for a small part of the time) he discussed the bouncing between integration and unit specs, which is always something I’ve worried I wasn’t doing properly: http://t.co/JtYE0GcAIf