Sha256: f0f22cbe3ff03f505acb3ed8ed80896a6bd8ebfccf8ab0be4606dc1172668f68

Contents?: true

Size: 471 Bytes

Versions: 4

Compression:

Stored size: 471 Bytes

Contents

require File.join( File.dirname(File.expand_path(__FILE__)), 'base')

describe RestClient::RawResponse do
  before do
    @tf = double("Tempfile", :read => "the answer is 42", :open => true)
    @net_http_res = double('net http response')
    @response = RestClient::RawResponse.new(@tf, @net_http_res, {})
  end

  it "behaves like string" do
    @response.to_s.should eq 'the answer is 42'
  end

  it "exposes a Tempfile" do
    @response.file.should eq @tf
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rest-client-1.6.14 spec/raw_response_spec.rb
rest-client-1.6.9 spec/raw_response_spec.rb
rest-client-1.6.8 spec/raw_response_spec.rb
rest-client-1.6.8.rc1 spec/raw_response_spec.rb