Archive for March, 2009

False-positive validation warnings

Friday, March 6th, 2009

I had been getting some validation warnings when running some of my specs. The W3 validator confirmed that my xHTML was valid.

After some googling of the problem, it turns out there is a difference between how xhtml and html documents are handled. Essentially, you need to tell the parser that the document is xHTML rather than HTML. More details here, here, and here.

The solution is to tell RSpec that the document is XML based. The options given in the links above work for RUnit based tests. Taking a look at the rspec source, it is checking to see if the response is XML based by noting the Content-Type header record. So, here’s the solution I used:

Now, when I run my specs, it correctly parses the response as XHTML and passes validation without any warnings.

Wanted: office space in Te Aro

Tuesday, March 3rd, 2009

We’re on the lookout for some office space in Te Aro. Somewhere between 75 and 125 square meters.

Our wish list includes:

  • Character
  • Earthquake safe
  • Showers
  • Cycle parking

Would appreciate a call if you’re aware of anything like this.