Sha256: 17ad9ef280cdb157a2b28abfc1f388caaa9f00c60cc87107332e877863b844c5

Contents?: true

Size: 548 Bytes

Versions: 3

Compression:

Stored size: 548 Bytes

Contents

require File.expand_path(File.dirname(__FILE__)+'/../spec_helper')
describe Restfully::HTTP::Response do

  it "should correctly initialize the attributes" do
    response = Restfully::HTTP::Response.new(404, {:content_type => 'application/json;charset=utf-8'}, '{"property1": "value1", "property2": "value2"}')
    response.status.should == 404
    response.headers.should == {
      'Content-Type' => 'application/json;charset=utf-8'
    }
    response.body.should == {
      'property1' => 'value1',
      'property2' => 'value2'
    }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
restfully-0.3.2 spec/http/response_spec.rb
restfully-0.3.1 spec/http/response_spec.rb
restfully-0.3.0 spec/http/response_spec.rb