Posted on 17/12/2009. By Pete Otaqui.
If you’re writing Cucumber tests using Webrat and Mechanize to test a site, and you are behind a proxy server, you can do something like this to tell mechanize about it in your webrat_steps.rb file:
When /^I am on (.+)$/ do |page_name|
I’m sure there’s a tidier way to do this, but it’s quick and it works with the following gem versions: