My test script learned from the book Wicked Cool Ruby Scripts