intertwingly

It’s just data

tmpl2xslt spec


I wrote a spec for tmpl2xslt and committed it to mars.  Unsurprisingly, I found and fixed a few bugs in the process.

Each “should” in the spec identifies a template, a feed snippet, a xpath expression, and identifies what should be produced.  Under the covers, there are a lot of regular expressions, html5lib, rexml being called multiple times, an XSLT transform (shelling out to a separate process, if necessary); all this for each should.  Despite all this, the tests run in about 1.5 seconds on a 3 year old laptop using Ruby 1.8.

Even though specs amount to little more than syntactic sugar, and certainly provide no function that couldn’t be addressed using only Test::Unit, I must say I like it.  Eliminating a small bit of clutter allows one to focus on the expectation itself.