A while ago I wrote about testing trivialities, and claimed that no matter how simple the piece of code is, it still ought to have a test. I followed it up with some thoughts on using a helper to simplify writing specs for common validations. Even using the helper, the actual test code for a single validation outweighs the production code by a factor of more than three:
Author: Kerry Buckley
I hate British Summer Time
No, not the season – the clock change. The bizarre anachronistic ritual of spending six months of the year pretending that it’s an hour later than it really is.
Shutdown Day
Tomorrow is Shutdown Day.
Can you survive for 24 hours without switching on your computer?
[Update] I managed. Did you?
Gratuitous rant
Why on earth do politicians and the media keep banging on about “carbon emissions,” “carbon trading,” “carbon-neutral” and so on, when they’re actually talking about carbon dioxide? It drives me mad!
There, that feels better. I’m going to relax now with a nice glass of hydrogen.
In case you missed it, those nice people at ThoughtWorks released CruiseControl.rb yesterday.
[Updated 14/3/07: corrected specify_attributes as per Paul’s comment]
[Updated 18/12/07: modified to avoid crazy RSpec errors]
A week or so ago I wrote about writing specs for simple pieces of functionality (particularly those that are arguably just configuration, like Rails validations). I argued that it’s important to test-drive even the simple things – however, the amount of test code can get out of hand.
From time to time I end up in a discussion (as often as not with myself) about the point at which something is so trivial that it doesn’t justify creating a unit test (or behaviour spec, in more BDD-like language).
I’ll get round to watching the whole thing eventually, but first, use the link underneath the video to skip to “What are some of the other principles of Lean?”
I never realised that Tom Poppendieck was such an accomplished ventriloquist!
Out of step
More proof, as if it were needed, that I’m not up-to-date with the latest fashions.
Just as I’m teetering on the brink of switching from Safari to Firefox at home (mainly for all that plugin goodness), I read that Firefox’s market share is down, and Safari’s is up.
[tags]firefox, safari, browser wars[/tags]
Yesterday we saw how easy it is to send text messages using the SDK, so now let’s try making a phone call.