Sha256: 6d13d888002fa0009b0eb04496df9dfc2023fefec4a6f779eaf0950735cf1084

Contents?: true

Size: 776 Bytes

Versions: 36

Compression:

Stored size: 776 Bytes

Contents

# frozen_string_literal: true

RSpec.describe HTTP::Options, "proxy" do
  let(:opts) { HTTP::Options.new }

  it "defaults to {}" do
    expect(opts.proxy).to eq({})
  end

  it "may be specified with with_proxy" do
    opts2 = opts.with_proxy(:proxy_address => "127.0.0.1", :proxy_port => 8080)
    expect(opts.proxy).to eq({})
    expect(opts2.proxy).to eq(:proxy_address => "127.0.0.1", :proxy_port => 8080)
  end

  it "accepts proxy address, port, username, and password" do
    opts2 = opts.with_proxy(:proxy_address => "127.0.0.1", :proxy_port => 8080, :proxy_username => "username", :proxy_password => "password")
    expect(opts2.proxy).to eq(:proxy_address => "127.0.0.1", :proxy_port => 8080, :proxy_username => "username", :proxy_password => "password")
  end
end

Version data entries

36 entries across 36 versions & 3 rubygems

Version Path
direct7-0.0.18 vendor/bundle/ruby/2.7.0/gems/http-5.1.1/spec/lib/http/options/proxy_spec.rb
direct7-0.0.17 vendor/bundle/ruby/2.7.0/gems/http-5.1.1/spec/lib/http/options/proxy_spec.rb
direct7-0.0.16 vendor/bundle/ruby/2.7.0/gems/http-5.1.1/spec/lib/http/options/proxy_spec.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/http-5.2.0/spec/lib/http/options/proxy_spec.rb
direct7-0.0.13 vendor/bundle/ruby/2.7.0/gems/http-5.1.1/spec/lib/http/options/proxy_spec.rb
direct7-0.0.12 vendor/bundle/ruby/2.7.0/gems/http-5.1.1/spec/lib/http/options/proxy_spec.rb
http-5.2.0 spec/lib/http/options/proxy_spec.rb
direct7-0.0.11 vendor/bundle/ruby/2.7.0/gems/http-5.1.1/spec/lib/http/options/proxy_spec.rb
http-5.1.1 spec/lib/http/options/proxy_spec.rb
http-5.1.0 spec/lib/http/options/proxy_spec.rb
http-5.0.4 spec/lib/http/options/proxy_spec.rb
http-5.0.3 spec/lib/http/options/proxy_spec.rb
http-5.0.2 spec/lib/http/options/proxy_spec.rb
http-5.0.1 spec/lib/http/options/proxy_spec.rb
http-5.0.0 spec/lib/http/options/proxy_spec.rb
http-4.4.1 spec/lib/http/options/proxy_spec.rb
http-4.4.0 spec/lib/http/options/proxy_spec.rb
http-5.0.0.pre3 spec/lib/http/options/proxy_spec.rb
http-5.0.0.pre2 spec/lib/http/options/proxy_spec.rb
http-4.3.0 spec/lib/http/options/proxy_spec.rb