Javascript code chunk from Agrian test, written in Ruby. Realized I got it wrong, and had to test. I was right about being wrong....