Sha256: 59a1b6974bd944d33818c66eb597f826292e97bb5672d8f65f624afa8679c128
Contents?: true
Size: 606 Bytes
Versions: 5
Compression:
Stored size: 606 Bytes
Contents
require File.dirname(__FILE__) + '/base' describe RestClient::Response do before do @net_http_res = mock('net http response', :to_hash => {"Status" => ["200 OK"]}) @response = RestClient::Response.new('abc', @net_http_res) end it "behaves like string" do @response.should == 'abc' end it "accepts nil strings and sets it to empty for the case of HEAD" do RestClient::Response.new(nil, @net_http_res).should == "" end it "test headers and raw headers" do @response.raw_headers["Status"][0].should == "200 OK" @response.headers[:status].should == "200 OK" end end
Version data entries
5 entries across 5 versions & 2 rubygems