Two weeks ago, I upgraded a project from rails 2.0.2 to 2.2.2. I had done some polymorphic associations, and I needed more powerful eager loading to prevent N+1 queries. The latest version of rails happens to meet my needs perfectly.
I told the customer that this work needed to be done and that it might take a few days to do it right, as it’s a large project and depends on a large number of gems and plugins. The customer was very reasonable and said if it had to be done, then we’d take the time to do it right. So I did the upgrade.
I upgraded rails and tried to start the server. It wouldn’t start. I followed the errors, upgrading plugin after plugin after gem until it launched. At this point, I could have deployed it to staging, crossing my fingers, hoping nothing had gone terribly wrong. Alternatively, I could’ve spent days exploring the application to find anything that broke. After doing that, I could have deployed to staging, crossing my fingers, hoping nothing had gone terribly wrong.
But wait, we’ve built our reputation on being world-class automated testing fanatics. So instead, I ran my tests. There were 1,777 spec failures and hundreds of integration test failures. I began the painstaking work of fixing tests one after another. It took 3 days, but finally the tests passed, and I was able to deploy with confidence.
It hurt a lot. I’ve never seen such a disruptive rails upgrade, including the jumps to 1.2 and 2.0. Half of my time zone code had to be rewritten. Almost every plugin was broken (but had new versions available). Uploads had to be tested differently. A new plugin now had some attributes protected from mass assignment, so I had to change my model creation code in a few places. Can you imagine the pain if I didn’t have tests?
I would have fixed the obvious issues, and deployed to staging. My customer would have come back to me over and over and over with things that no longer worked, and each time, I’d have had to walk through the painful steps of reproducing the issue and then tracking it down to its source. It could have taken weeks, and even then perhaps no one would have noticed that time zones weren’t working right until it was in production.
To be fair, some of the pain came from the tests themselves. Some of our testing techniques relied on rspec behavior that changed or on some intricacy in the framework. But I’ll gladly take that pain if it saves bugs in staging or production.


16 Comments
New Medicine Like Neurotin http://www.gimptv.net/ – meridia http://www.gimptv.net/ – meridia no prescription phentermine without prescription http://www.gimptv.net/ – meridia no perscription
Hello, Pocket Pc Drug Reference Guide http://healthylivingtrends.com/ – cialis it http://healthylivingtrends.com/ – cialis generico Il Cialis permette quindi di parlare molto da vicino di cura, e non solo di rimedio contro l’impotenza. http://healthylivingtrends.com/ – cialis prezzo
A Drug Interaction Chart http://www.ilowamegahunter.com/ – generic clonazepam Klonopin is one of the most useful drugs for treating anxiety that has no known cause. http://www.ilowamegahunter.com/ – buy klonopin without prescription
Medicine Merit Badge Answers http://www.fish-tank-aquariums.net/ – cheap nexium
Basically, the medication works to prevent the production of gastric acids which will cure or at least treat the conditions listed above. http://www.fish-tank-aquariums.net/ – nexium medication
Cheraw Family Medicine http://www.moslounge.com/ – online pharmacy viagra ED can be brought on by stress so having the extra stress of keeping the problem all to yourself will not at all help the matter. http://www.moslounge.com/ – viagra price
Penis Enlargement Pills Portland http://www.howweconnect.com/ – propecia purchase propecia online The only way to tell if Propecia will work for you is to try it. http://www.howweconnect.com/ – order propecia online without prescription
Drug Testing Pass Real Urin http://www.thecoffeehausdowntown.com/ – low cost phentermine Some of the more common side effects include but are not limited to increased blood pressure, increased heart rate, palpitations, insomnia, and restlessness. http://www.thecoffeehausdowntown.com/ – discount phentermine
Urine In Medicines http://www.toreadnext.com/ – purchase xanax Patients with a history of drug dependency will usually not be given Xanax. http://www.toreadnext.com/ – buy cheap xanax
Ray Henderson Bc Drug Charges http://todoperlas.com/ – buy generic clonazepam xanax online As is the case with all medications, Klonopin may cause unwanted side effects. http://todoperlas.com/ – buy klonopin without prescription
Complementary Medicine And Hornsby http://www.thegirlyghosthunters.com – zolpidem 10 mg If you had 7 – 8 hours of restful sleep, then you don’t need to take Ambien. http://www.thegirlyghosthunters.com – ambien medication
Drug Abuse Documents meridia without prescription Just don?t drink alcohol if you are relying on Meridia. http://www.texasstatecycling.com/ – meridia drug
Cat Deaths Topically Applied Medicines http://www.bainbridgeonline.com – alprazolam 0.5mg http://www.bainbridgeonline.com – generic xanax online It is highly recommended that this drug should be used by the adults only. xanax antidepressant
Drug Deals On College Campus http://www.bridge2dubai.com/ – valium cost Furthermore it explains that Valium freely crosses into the placenta during early pregnancy. http://www.bridge2dubai.com/ – valium drug
Hello, Dixie Drug Store Hendrick http://www.cherch.org/ – diazepam 5mg In capsule form, 15 mg is available. http://www.cherch.org/ – buy valium
qxfmmtqjo, ysxwsygsnz
mymiktqjo, iypkdqlgtq