Sha256: b637615cbb968a0ce6fd14da87e0d3a63ce3a2aa25bd598f5278713ab95e9576

Contents?: true

Size: 574 Bytes

Versions: 136

Compression:

Stored size: 574 Bytes

Contents

# frozen_string_literal: true

RSpec.describe Faraday::RequestOptions do
  subject(:options) { Faraday::RequestOptions.new }

  it 'allows to set the request proxy' do
    expect(options.proxy).to be_nil

    expect { options[:proxy] = { booya: 1 } }.to raise_error(NoMethodError)

    options[:proxy] = { user: 'user' }
    expect(options.proxy).to be_a_kind_of(Faraday::ProxyOptions)
    expect(options.proxy.user).to eq('user')

    options.proxy = nil
    expect(options.proxy).to be_nil
    expect(options.inspect).to eq('#<Faraday::RequestOptions (empty)>')
  end
end

Version data entries

136 entries across 123 versions & 17 rubygems

Version Path
faraday-1.8.0 spec/faraday/options/request_options_spec.rb
faraday-1.7.2 spec/faraday/options/request_options_spec.rb
faraday-1.7.1 spec/faraday/options/request_options_spec.rb
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/faraday-1.7.0/spec/faraday/options/request_options_spec.rb
tdiary-5.1.7 vendor/bundle/ruby/2.7.0/gems/faraday-1.4.2/spec/faraday/options/request_options_spec.rb
mx-platform-ruby-0.4.0 vendor/bundle/ruby/2.6.0/gems/faraday-1.7.0/spec/faraday/options/request_options_spec.rb
mx-platform-ruby-0.3.2 vendor/bundle/ruby/2.6.0/gems/faraday-1.7.0/spec/faraday/options/request_options_spec.rb
mx-platform-ruby-0.3.1 vendor/bundle/ruby/2.6.0/gems/faraday-1.7.0/spec/faraday/options/request_options_spec.rb
faraday-1.7.0 spec/faraday/options/request_options_spec.rb
faraday-1.6.0 spec/faraday/options/request_options_spec.rb
faraday-1.5.1 spec/faraday/options/request_options_spec.rb
faraday-1.5.0 spec/faraday/options/request_options_spec.rb
faraday-1.4.3 spec/faraday/options/request_options_spec.rb
passbase-1.3.0 vendor/bundle/ruby/2.7.0/gems/faraday-1.4.2/spec/faraday/options/request_options_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/2.7.0/gems/faraday-1.3.0/spec/faraday/options/request_options_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/faraday-1.1.0/spec/faraday/options/request_options_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/faraday-1.2.0/spec/faraday/options/request_options_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/faraday-1.1.0/spec/faraday/options/request_options_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/3.0.0/gems/faraday-1.4.2/spec/faraday/options/request_options_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/faraday-1.4.2/spec/faraday/options/request_options_spec.rb