Skip to content

Checking a site via a proxy

tauboy edited this page Sep 13, 2010 · 1 revision

If you are testing a url via a proxy server you need to add a new step to the appropiate step file, or add it to the webrat_steps.rb file to make it global

When /^I go via external proxy to (.*)$/ do |path|
adapter.mechanize.set_proxy('proxy.site.com',8080)
  visit path
end

and then call it using a feature similar to this

  Scenario: Visiting home page
    When I go via external proxy to <URL>
    Then the request should succeed
Clone this wiki locally