So, I spent yesterday working on Chapter 11 of the Rails Tutorial. It's been great, but there was a "re-factoring" section in the middle that I knew was going to haunt me. There were too many changes, too many RSpec test added and and the development was just too much. My code "blew up" on me. I had at least 14 tests go red, and the solution that should have been obvious was completely hidden behind all my attempted fixes that only made things worse.
So, I blew away all my Chapter 11 work ("git reset --hard" takes you back to your last commit). I started again, and when I got to the "too busy" part, I broke it down into smaller chunks and went by baby steps (with a complete RSpec run after every step).
Did I find my problem? NO!!!!!
Every RSpec test passes now with flying colours.
The big step (I had thought) was to move "def authenticate ..." from the users_controller to the sessions_helper. I moved the code, ran the test, held my breath, ... and it ran green! For once, I really wanted my code to blow up (so it would justify all my pain from yesterday). What I had spent an hour researching and 2 hours repairing... was not a problem ... at all. (groan)
So, I have no idea where my code went wrong yesterday, so I have nothing to learn from my mistake.
However, maybe my biggest mistake was to "follow the instructions" when my gut said, "Take it slow or you'll get lost!"
So, that's the lesson of the day. Take your TDD in baby steps (and don't worry if it feels slow, because the alternative is ... ARGGG!)
[TDD = Test Driven Development]