Sha256: 3aecdbb905abe287785403697d324adf2a01b46ec4dcf3126cd3825d76f02d36
Contents?: true
Size: 812 Bytes
Versions: 19
Compression:
Stored size: 812 Bytes
Contents
require 'spec_helper' describe GnipApi::Response do before { @uri = URI('http://somewhere.com') } it 'creates a response' do request = GnipApi::Request.new_get @uri expect(Proc.new{GnipApi::Response.new(request, 200, 'body', {:header => 'a header'})}).not_to raise_error end describe 'response data' do before do @status = 100 @body = 'something' @headers = {:header => 'something'} @request = GnipApi::Request.new_get @uri @response = GnipApi::Response.new(@request, @status, @body, @headers) end it 'has a status' do expect(@response.status).to eq(@status) end it 'has a body' do expect(@response.body).to eq(@body) end it 'has headers' do expect(@response.headers).to eq(@headers) end end end
Version data entries
19 entries across 19 versions & 1 rubygems