From: Phlip Date: 2008-09-13T23:38:07+09:00 Subject: Re: unit testing offline with mechanize Adam Akhtar wrote: > Although mechanize is designed to navigate around web pages online, is > there a way to load up webpages saved to the harddrive for the purposes > of quick unit testing. Constantly accessing online sources slows down > the tests. I tried to simply type the file name instead of the url in > agent.get("..") but it complains. I tried get_file and that didnt work > either. That sounds like the assumption you must serve a page through a web server just to unit test it. Why not do what Rails tests do - call the same method a server would call to generate a page, then read it as a string and test it? -- Phlip