mirror of
https://github.com/rest-client/rest-client.git
synced 2022-11-09 13:49:40 -05:00
17 lines
435 B
Ruby
17 lines
435 B
Ruby
require File.dirname(__FILE__) + '/base'
|
|
|
|
describe RestClient::RawResponse do
|
|
before do
|
|
@tf = mock("Tempfile", :read => "the answer is 42", :open => true)
|
|
@net_http_res = mock('net http response')
|
|
@response = RestClient::RawResponse.new(@tf, @net_http_res)
|
|
end
|
|
|
|
it "behaves like string" do
|
|
@response.to_s.should == 'the answer is 42'
|
|
end
|
|
|
|
it "exposes a Tempfile" do
|
|
@response.file.should == @tf
|
|
end
|
|
end
|