Sha256: ba045306ad6ca0870120471da141e1bb83505e220105edfcd68f9324ccb4d6ad
Contents?: true
Size: 832 Bytes
Versions: 2
Compression:
Stored size: 832 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Hatetepe::Request do describe '#initialize' do subject do Hatetepe::Request.new(:get, '/a?b=c', { 'Key' => 'value' }, 'hello').freeze end its(:http_method) { should be(:get) } its(:uri) { should eq('/a?b=c') } its(:headers) { should eq('Key' => 'value') } specify { expect(subject.body.read).to eq('hello') } describe 'defaults' do subject { Hatetepe::Request.new(:get, '/') } its(:headers) { should eq({}) } its(:http_version) { should eq(1.1) } specify { expect(subject.body.read).to be_empty } end end describe '#http_version=' do subject { Hatetepe::Request.new(:get, '/') } before { subject.http_version = 1.0 } its(:http_version) { should eq(1.0) } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hatetepe-0.6.0.pre.2 | spec/unit/request_spec.rb |
hatetepe-0.6.0.pre.1 | spec/unit/request_spec.rb |