Sha256: f02ea28feadd13fc1de559106bc3cd3de2798fc5c8d6eb48eec0592ea8f503bb
Contents?: true
Size: 842 Bytes
Versions: 17
Compression:
Stored size: 842 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 it "should return the unserialized body" do response = Restfully::HTTP::Response.new(404, {:content_type => 'application/json;charset=utf-8'}, '{"property1": "value1", "property2": "value2"}') response.raw_body.should == "{\"property1\": \"value1\", \"property2\": \"value2\"}" end end
Version data entries
17 entries across 17 versions & 1 rubygems