Sha256: f4832dbc49e858e893ddd78532f0bc57e77404f864c1acc7243dbc2b20022270

Contents?: true

Size: 977 Bytes

Versions: 15

Compression:

Stored size: 977 Bytes

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
  end
end

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
abhay-typhoeus-0.0.22 spec/typhoeus/response_spec.rb
dbalatero-typhoeus-0.0.20 spec/typhoeus/response_spec.rb
dbalatero-typhoeus-0.0.21 spec/typhoeus/response_spec.rb
dbalatero-typhoeus-0.0.22 spec/typhoeus/response_spec.rb
pauldix-typhoeus-0.0.13 spec/typhoeus/response_spec.rb
pauldix-typhoeus-0.0.14 spec/typhoeus/response_spec.rb
pauldix-typhoeus-0.0.15 spec/typhoeus/response_spec.rb
pauldix-typhoeus-0.0.16 spec/typhoeus/response_spec.rb
pauldix-typhoeus-0.0.17 spec/typhoeus/response_spec.rb
pauldix-typhoeus-0.0.18 spec/typhoeus/response_spec.rb
pauldix-typhoeus-0.0.19 spec/typhoeus/response_spec.rb
pauldix-typhoeus-0.0.20 spec/typhoeus/response_spec.rb
pauldix-typhoeus-0.0.22 spec/typhoeus/response_spec.rb
pauldix-typhoeus-0.0.23 spec/typhoeus/response_spec.rb
pauldix-typhoeus-0.0.24 spec/typhoeus/response_spec.rb