Sha256: 6bf3d208aff19bb9dbb2afc98ecbab6a327c837252bdd69201fb745ed2f893f7
Contents?: true
Size: 647 Bytes
Versions: 12
Compression:
Stored size: 647 Bytes
Contents
When /^I set my HTTParty timeout option to (\d+)$/ do |timeout| @request_options[:timeout] = timeout.to_i end When /I call HTTParty#get with '(.*)'$/ do |url| begin @response_from_httparty = HTTParty.get("http://#{@host_and_port}#{url}", @request_options) rescue HTTParty::RedirectionTooDeep, Timeout::Error => e @exception_from_httparty = e end end When /I call HTTParty#get with '(.*)' and a basic_auth hash:/ do |url, auth_table| h = auth_table.hashes.first @response_from_httparty = HTTParty.get( "http://#{@host_and_port}#{url}", :basic_auth => { :username => h["username"], :password => h["password"] } ) end
Version data entries
12 entries across 12 versions & 6 rubygems