Currently, frameworks like webunit currently have the ability to parse through returned HTML, and verifying content. Wrapping this with something like mechanize should be trivial. Plus, this would also open up the ability to use other types--for example, JSON objects.