savon_spec icon indicating copy to clipboard operation
savon_spec copied to clipboard

Allow more kind of object in mock

Open shingara opened this issue 12 years ago • 0 comments

With a mock you allow return a symbol or an Hash. But with our test we can want return some Savon::SOAP::Response or HTTPI::Response save by vcr for example.

This commit allow to return this kind of Object. You can do something like :

resources = VCR.use_cassette('get_resources') do
  Savon.client(wsdl).request(:get_resouces)
end

savon.expects(:get_resources).returns(resources)

shingara avatar Nov 16 '12 10:11 shingara