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

This better matches the behavior of Net::HTTP and will make it more obvious to users what the option actually does.
14 lines
259 B
Ruby
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
|