Sha256: d8ea21126e48f9beb6f46342905d9002cfcb89092ce8b4dff82e2b8427334512

Contents?: true

Size: 1.38 KB

Versions: 29

Compression:

Stored size: 1.38 KB

Contents

When /^I set my HTTParty timeout option to (\d+)$/ do |timeout|
  @request_options[:timeout] = timeout.to_i
end

When /^I set my HTTParty open_timeout option to (\d+)$/ do |timeout|
  @request_options[:open_timeout] = timeout.to_i
end

When /^I set my HTTParty read_timeout option to (\d+)$/ do |timeout|
  @request_options[:read_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#head with '(.*)'$/ do |url|
  begin
    @response_from_httparty = HTTParty.head("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

When /I call HTTParty#get with '(.*)' and a digest_auth hash:/ do |url, auth_table|
  h = auth_table.hashes.first
  @response_from_httparty = HTTParty.get(
    "http://#{@host_and_port}#{url}",
    digest_auth: { username: h["username"], password: h["password"] }
  )
end

Version data entries

29 entries across 28 versions & 5 rubygems

Version Path
httparty-0.17.0 features/steps/httparty_steps.rb
httparty-0.16.4 features/steps/httparty_steps.rb
httparty-0.16.3 features/steps/httparty_steps.rb
httparty-0.16.2 features/steps/httparty_steps.rb
httparty-0.16.1 features/steps/httparty_steps.rb
httparty-0.16.0 features/steps/httparty_steps.rb
httparty-0.15.7 features/steps/httparty_steps.rb
httparty-0.15.6 features/steps/httparty_steps.rb
httparty-0.15.5 features/steps/httparty_steps.rb
httparty-0.15.4 features/steps/httparty_steps.rb
httparty-0.15.3 features/steps/httparty_steps.rb
httparty-0.15.2 features/steps/httparty_steps.rb
httparty-0.15.1 features/steps/httparty_steps.rb
httparty-0.15.0 features/steps/httparty_steps.rb
httparty-0.14.0 features/steps/httparty_steps.rb
simplenet-client-0.2.0 ./vendor/bundle/ruby/2.0.0/gems/httparty-0.13.7/features/steps/httparty_steps.rb
simplenet-client-0.2.0 ./vendor/bundle/ruby/1.9.1/gems/httparty-0.13.7/features/steps/httparty_steps.rb
httparty-0.13.7 features/steps/httparty_steps.rb
httparty-0.13.6 features/steps/httparty_steps.rb
httpserious-0.13.5.lstoll1 features/steps/httparty_steps.rb