Add specs

The process of turning the comments into specs actually found a bug in the example given.

Should be straightforward. These specs were written by commenting out the whole file and re-enabling as I went, test-driving it.

cc @ggilder @tamird