Sha256: ddbfa48fdfbc8aafc117915e411e365adf0de55b100a1bab9c165b637e5e69aa

Contents?: true

Size: 660 Bytes

Versions: 39

Compression:

Stored size: 660 Bytes

Contents

require_relative '_lib'

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

  it "behaves like string" do
    expect(@response.to_s).to eq 'the answer is 42'
  end

  it "exposes a Tempfile" do
    expect(@response.file).to eq @tf
  end

  it "includes AbstractResponse" do
    expect(RestClient::RawResponse.ancestors).to include(RestClient::AbstractResponse)
  end
end

Version data entries

39 entries across 21 versions & 2 rubygems

Version Path
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/paynow_sdk-1.0.9/vendor/bundle/ruby/2.7.0/gems/rest-client-2.1.0/spec/unit/raw_response_spec.rb
paynow_sdk-1.1.0 vendor/cache/ruby/2.7.0/gems/rest-client-2.1.0/spec/unit/raw_response_spec.rb
paynow_sdk-1.1.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/rest-client-2.1.0/spec/unit/raw_response_spec.rb
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/rest-client-2.1.0/spec/unit/raw_response_spec.rb
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/paynow_sdk-1.0.9/vendor/cache/ruby/2.7.0/gems/rest-client-2.1.0/spec/unit/raw_response_spec.rb
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/paynow_sdk-1.0.9/vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/rest-client-2.1.0/spec/unit/raw_response_spec.rb
paynow_sdk-1.0.9 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/rest-client-2.1.0/spec/unit/raw_response_spec.rb
paynow_sdk-1.0.9 vendor/cache/ruby/2.7.0/gems/rest-client-2.1.0/spec/unit/raw_response_spec.rb
paynow_sdk-1.0.9 vendor/bundle/ruby/2.7.0/gems/rest-client-2.1.0/spec/unit/raw_response_spec.rb
paynow_sdk-1.0.8 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/rest-client-2.1.0/spec/unit/raw_response_spec.rb
paynow_sdk-1.0.8 vendor/cache/ruby/2.7.0/gems/rest-client-2.1.0/spec/unit/raw_response_spec.rb
paynow_sdk-1.0.8 vendor/bundle/ruby/2.7.0/gems/rest-client-2.1.0/spec/unit/raw_response_spec.rb
paynow_sdk-1.0.7 vendor/cache/ruby/2.7.0/gems/rest-client-2.1.0/spec/unit/raw_response_spec.rb
paynow_sdk-1.0.7 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/rest-client-2.1.0/spec/unit/raw_response_spec.rb
paynow_sdk-1.0.6 vendor/cache/ruby/2.7.0/gems/rest-client-2.1.0/spec/unit/raw_response_spec.rb
paynow_sdk-1.0.6 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/rest-client-2.1.0/spec/unit/raw_response_spec.rb
paynow_sdk-1.0.5 vendor/cache/ruby/2.7.0/gems/rest-client-2.1.0/spec/unit/raw_response_spec.rb
paynow_sdk-1.0.5 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/rest-client-2.1.0/spec/unit/raw_response_spec.rb
paynow_sdk-1.0.4 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/rest-client-2.1.0/spec/unit/raw_response_spec.rb
paynow_sdk-1.0.4 vendor/cache/ruby/2.7.0/gems/rest-client-2.1.0/spec/unit/raw_response_spec.rb