Sha256: bdc481d492d8588f54d288f59b2ddf8376651b1ef405fe969121af242cd83445
Contents?: true
Size: 1.13 KB
Versions: 22
Compression:
Stored size: 1.13 KB
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe Typhoeus::Response do describe "initialize" do it "should store response_code" do Typhoeus::Response.new(:code => 200).code.should == 200 end it "should store response_headers" do Typhoeus::Response.new(:headers => "a header!").headers.should == "a header!" end it "should store response_body" do Typhoeus::Response.new(:body => "a body!").body.should == "a body!" end it "should store request_time" do Typhoeus::Response.new(:time => 1.23).time.should == 1.23 end it "should store requested_url" do response = Typhoeus::Response.new(:requested_url => "http://test.com") response.requested_url.should == "http://test.com" end it "should store requested_http_method" do response = Typhoeus::Response.new(:requested_http_method => :delete) response.requested_http_method.should == :delete end it "should store an associated request object" do response = Typhoeus::Response.new(:request => "whatever") response.request.should == "whatever" end end end
Version data entries
22 entries across 22 versions & 4 rubygems