# Loading offline html files with mechanize

**URL:** <https://www.ruby-forum.com/t/loading-offline-html-files-with-mechanize/163631>\
**Category:** Ruby\
**Created:** [March 23, 2009, 12:43pm UTC](https://www.ruby-forum.com/t/loading-offline-html-files-with-mechanize/163631 "2009-03-23T12:43:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![scudco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@scudco](https://www.ruby-forum.com/u/scudco)\
**Post date:** [March 23, 2009, 12:43pm UTC](https://www.ruby-forum.com/t/loading-offline-html-files-with-mechanize/163631/1 "2009-03-23T12:43:24Z")

</div>

this may be a dumb simple question yet ive googled and cant find out  
what im doing wrong

in my unit tests i want to use offline html pages otherwise live pages  
content will change and cause my tests to fail.

How do i do this

ive tried agent.get(‘my\_filename.html’) and  
agent.get\_file(‘my\_filename.html’) but errors crop up. Ive checked the  
ref docs but most classes have no write up yet (nice interface though!)  
so im stuck. Can anyone help
