Update: This project got put on hold for a very good reason: I added a new client with a large project and a tight deadline. I’ll probably give the 48-hour-app idea another go when things calm down!
Day 1 did not go according to plan.
The morning started out well. The Rails project was created, and I quickly installed the gems and plugins I needed to set up my testing environment. (For those who care about such things: I’m using Shoulda, Cucumber, Webrat, and Factory Girl to accomplish my testing-fu.) So far, so good.
The next step was to install the Clearance gem. Clearance is an authentication gem that’s very testing-friendly, and it also makes heavy use of Shoulda, Cucumber and Factory Girl. What could go wrong?
As it turns out, quite a lot.
Most of unit and integration tests built into Clearance were failing out of the gate, for reasons that made no sense. It turns out that my copy of the Shoulda gem was out of date. Lesson learned: When using a third-party gem or plugin, check the version numbers of your installed dependencies - it can make a big difference!
Then the Cucumber features started to fail. Webrat was reporting that flash messages weren’t getting set, while the code showed that they were. After an hour or so of banging my head against a wall, I realized that my application layout was only displaying flash[:notice], but the Clearance instructions clearly state that I need to show all flashes. Lesson learned: Read the instructions, you idiot.
It was at this point that my older kids got home from school, and my eldest daughter reported that she chipped a tooth after falling off the monkey bars. Some phone calls and a trip to the dentist later, and the tooth is repaired. My afternoon, however, is gone. Lesson learned: stuff happens.
Then it was off to a PTA committee meeting/dinner with my wife, and we didn’t get home until 9 PM. My brain at this point was well and truly fried, so rather than try to pick up where I left off, I decided to join my wife on the couch and watch Survivor off the DVR.
And that, boys and girls, is how good plans go awry.
Little enough was accomplished yesterday that I can say with confidence that I’ll get Foretweet finished today, unless I cut corners and give up on all testing. But one of my goals in building this application is to get more comfortable with full-stack testing, so that’s a no-go. I’d rather get it done right than get it done fast. If I can find some time this weekend to work on it, and if today doesn’t turn into a repeat of yesterday, I should still be able to get Foretweet launched before Monday.
Or, maybe I’m crazy. We’ll find out!
{ 0 comments }