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

Version Path
pauldix-typhoeus-0.1.0 spec/typhoeus/response_spec.rb
pauldix-typhoeus-0.1.1 spec/typhoeus/response_spec.rb
pauldix-typhoeus-0.1.2 spec/typhoeus/response_spec.rb
typhoeus-0.1.18 spec/typhoeus/response_spec.rb
typhoeus-0.1.17 spec/typhoeus/response_spec.rb
typhoeus-0.1.16 spec/typhoeus/response_spec.rb
typhoeus-0.1.15 spec/typhoeus/response_spec.rb
typhoeus_curly-0.1.14 spec/typhoeus/response_spec.rb
typhoeus-0.1.14 spec/typhoeus/response_spec.rb
typhoeus-0.1.13 spec/typhoeus/response_spec.rb
typhoeus-0.1.12 spec/typhoeus/response_spec.rb
typhoeus-0.1.11 spec/typhoeus/response_spec.rb
typhoeus-0.1.10 spec/typhoeus/response_spec.rb
typhoeus-0.1.9 spec/typhoeus/response_spec.rb
typhoeus-0.1.8 spec/typhoeus/response_spec.rb
typhoeus-0.1.7 spec/typhoeus/response_spec.rb
typhoeus-0.1.6 spec/typhoeus/response_spec.rb
typhoeus-0.1.5 spec/typhoeus/response_spec.rb
typhoeus-0.1.4 spec/typhoeus/response_spec.rb
sandofsky-typhoeus-0.1.3 spec/typhoeus/response_spec.rb