File: options_spec.rb

package info (click to toggle)
ruby-http 0.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 404 kB
  • ctags: 213
  • sloc: ruby: 2,397; makefile: 7
file content (14 lines) | stat: -rw-r--r-- 319 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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