Posted on 18/02/2010. By Pete Otaqui.
Thanks to some brilliant tidying up of my work by my good friend Patrick, there is now a bbc_standards ruby gem which you can use to validate pages against some of the BBC Technical Guidelines (more specifically the “Semantic Mark-up” and “XHTML Integrity” standards).
This gem was originally designed to work with Cucumber, and initially was intended to just validate pages against the XHTML Strict doctype that BBC pages are usually required to use. Since it uses Nokogiri for validation – against the XML Schema rather than the Doctype for what it’s worth – the testing is a) strict and b) *fast*. There are no external webservice calls, so it is fine to test all page loads within Cucumber, even testing the same URI many times over (since the bottleneck will almost certainly be your app by some margin.
I’m currently working on a post about using the gem for the BBC Web Developer blog, but I thought I’d point any interested parties at the code here and now.