mirror of
https://github.com/rest-client/rest-client.git
synced 2022-11-09 13:49:40 -05:00
6c6b8f2fc0
Add standards-compliant cookie handling. Merge branch 'ab-cookies' into 2.0.x Conflicts: history.md lib/restclient/abstract_response.rb lib/restclient/response.rb lib/restclient/version.rb spec/unit/request_spec.rb spec/unit/response_spec.rb
18 lines
474 B
Ruby
18 lines
474 B
Ruby
require_relative '_lib'
|
|
|
|
describe RestClient::RawResponse do
|
|
before do
|
|
@tf = double("Tempfile", :read => "the answer is 42", :open => true)
|
|
@net_http_res = double('net http response')
|
|
@request = double('http request')
|
|
@response = RestClient::RawResponse.new(@tf, @net_http_res, {}, @request)
|
|
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
|