Hey WWW::Mechanize users,<br><br>I've been using Mechanize for about 3 or 4 months now, and I'm rather enjoying it. I've done scraping in PHP & Python, starting with raw text and HTTP requests, moving up to regex and Curl, and finally landed myself here, making me much more productive when scraping pages.
<br><br>At the moment, I'm in the middle of a decent sized project, which requires scraping lots of pages. Now, I'd like to be able to refactor much of it, however I'm not entirely happy with the tests that I'm writing. I'm creating way too many global variables, and monkey patching classes instead of creating mocks. I would ideally like to have something like ActiveRecord's fixtures, where I can serialize a page along with some meta-data about it, along with a mock instance of my Mechanize instance.
<br><br>Has anyone else done any extensive testing with Mechanize? I'd like to hear about what kinds of tips and tricks you employed to come up with something that worked well.<br><br>Thanks!<br><br>-Rob<br>