mirror of
https://github.com/rest-client/rest-client.git
synced 2022-11-09 13:49:40 -05:00

* Put unit and integration specs into separate subdirectories * Consolidate all requires of 'webmock/rspec' into spec_helper.rb * Use WebMock.{disable!,enable!} for specs calling live server
17 lines
424 B
Ruby
17 lines
424 B
Ruby
require 'spec_helper'
|
|
|
|
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
|