1
0
Fork 0
mirror of https://github.com/rest-client/rest-client.git synced 2022-11-09 13:49:40 -05:00
rest-client--rest-client/spec/helpers.rb
Andy Brody 4932e7e358 Deprecate :timeout in favor of :read_timeout.
This better matches the behavior of Net::HTTP and will make it more
obvious to users what the option actually does.
2015-03-14 15:18:36 -07:00

14 lines
259 B
Ruby

module Helpers
def response_double(opts={})
double('response', {:to_hash => {}}.merge(opts))
end
def fake_stderr
original_stderr = $stderr
$stderr = StringIO.new
yield
$stderr.string
ensure
$stderr = original_stderr
end
end