0.0
No commit activity in last 3 years
No release in over 3 years
This gem should be used when you test Mechanize offline
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 2.10.0

Runtime

>= 2.1.1
 Project Readme

MechanizeRspec

This gem should be used when you test Mechanize offline

Installation

Add this line to your application's Gemfile:

gem 'mechanize_rspec'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mechanize_rspec

Usage

Set up and Example

In your application you should set up

> require 'mechanize_rspec'
> Mechanize::Config.dirname = 'dir_name'

Where in dir_name you should have filese:

location.yml
file_1.html
file_2.html
...
file_n.html

Where in file 'location.yml' should be:

> ---
> 'http://HOST/index.html': '/file_1.html'
> 'http://HOST/pl/index.html': '/file_2.html'
> ...
> 'http://HOST/index.html': '/file_n.html'

Methods

Show all used urls (is useful when we want compare with file location.yml)

> Mechanize.get("http://www.test.pl")
> Mechanize::Config.uris.inspect #=> ["http://www.test.pl"]