Sha256: 027ab3850ebaa74429d1afba105ac3d07dd46acdce41a6acfd50753f85316395

Contents?: true

Size: 319 Bytes

Versions: 6

Compression:

Stored size: 319 Bytes

Contents

require 'spec_helper'

describe HTTP::Options do
  subject { described_class.new(:response => :body) }

  it 'behaves like a Hash for reading' do
    expect(subject[:response]).to eq(:body)
    expect(subject[:nosuchone]).to be nil
  end

  it 'coerces to a Hash' do
    expect(subject.to_hash).to be_a(Hash)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
http-0.6.4 spec/http/options_spec.rb
http-0.6.3 spec/http/options_spec.rb
http-0.6.2 spec/http/options_spec.rb
http-0.6.1 spec/http/options_spec.rb
http-0.6.0 spec/http/options_spec.rb
http-0.6.0.pre spec/http/options_spec.rb