Hey WWW::Mechanize users,<br><br>I&#39;ve been using Mechanize for about 3 or 4 months now, and I&#39;m rather enjoying it. I&#39;ve done scraping in PHP &amp; 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&#39;m in the middle of a decent sized project, which requires scraping lots of pages. Now, I&#39;d like to be able to refactor much of it, however I&#39;m not entirely happy with the tests that I&#39;m writing. I&#39;m creating way too many global variables, and monkey patching classes instead of creating mocks. I would ideally like to have something like ActiveRecord&#39;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&#39;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>