1
Shindo.tests("Excon support for middlewares that return canned responses") do
4
canned_response_middleware = Class.new(Excon::Middleware::Base) do
5
define_method :request_call do |params|
15
tests('does not mutate the canned response body').returns("canned") do
17
'http://some-host.com/some-path',
18
:middlewares => [canned_response_middleware] + Excon.defaults[:middlewares],
19
:response_block => Proc.new { } # to force streaming