Posts Tagged ‘Writing Reliable’

It happens to the best of us

Posted by Rahoul Baruah on October 5th, 2009 under Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code Tags: , , , , , ,  •  Comments Off

We just had some customers report a bug. Not good. We didn’t get an exception email. All the tests passed. We couldn’t see anything untoward in the log files. But it was there. We could reproduce it, both in staging and in production. Not good at all.
But the weirdest thing was we couldn’t [...]

Switching off transactions for a single spec when using RSpec

Posted by Rahoul Baruah on May 8th, 2009 under Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code Tags: , , , ,  •  Comments Off

I have just written a load of test code that needed to verify that a particular set of classes behaved correctly when a transaction was rolled back.
However, the rest of my suite relied on transactional fixtures (which is Rails’ badly named way of saying that a transaction is started before each test and [...]

Fixing bugs in untested code

Posted by Rahoul Baruah on May 6th, 2009 under Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code Tags: , , , ,  •  Comments Off

When you’ve got an application that has little or no test coverage it can be quite daunting making changes. What if you alter X and it breaks Y? Without running through the entire app by hand how will you know what you’ve broken?
Well you won’t.
Even worse, what if your [...]

Quick Tip: make it easier to debug your full-stack acceptance tests

Posted by Rahoul Baruah on March 24th, 2009 under Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code Tags: , , , , , , ,  •  1 Comment

One of the issues when using Selenium or Watir to power your full-stack acceptance testing (apart from the time it takes for the test suite to run), is that stuff happens within your browser, fails and then Cucumber happily moves on to the next test before you get a chance to look at what went [...]

The trouble with mocks (or design versus acceptance)

Posted by Rahoul Baruah on March 12th, 2009 under General Tags: , , , , , , , ,  •  2 Comments

I had the pleasure of speaking to Luke Redpath the other day.
I started off by thanking him for his Demeter’s Revenge plugin, which is one of the first things I install on a new project. He said he didn’t use it much any more, as he doesn’t do mocking, except during the design [...]