You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the latest savon (currently 0.9.6), savon_spec no longer works properly. Here is the output for "rspec spec":
Failures:
1) Savon::Spec::Mock#expects and #with should expect Savon to send a given SOAP body
Failure/Error: client.request :get_user do
Mocha::ExpectationError:
unexpected invocation: #<AnyInstance:Savon::SOAP::XML>.body=(nil)
unsatisfied expectations:
- expected exactly once, not yet invoked: HTTPI.post()
- expected exactly once, not yet invoked: #<AnyInstance:Savon::SOAP::XML>.body=(:id => 1)
# ./spec/savon/spec/mock_spec.rb:47
2) Savon::Spec::Mock#expects and #with should fail when the SOAP body was not send
Failure/Error: client.request(:get_user)
Mocha::ExpectationError:
unexpected invocation: #<AnyInstance:Savon::SOAP::XML>.body=(nil)
unsatisfied expectations:
- expected exactly once, not yet invoked: HTTPI.post()
- expected exactly once, not yet invoked: #<AnyInstance:Savon::SOAP::XML>.body=(:id => 1)
# ./spec/savon/spec/mock_spec.rb:53
Finished in 0.03766 seconds
29 examples, 2 failures
Failed examples:
rspec ./spec/savon/spec/mock_spec.rb:46 # Savon::Spec::Mock#expects and #with should expect Savon to send a given SOAP body
rspec ./spec/savon/spec/mock_spec.rb:52 # Savon::Spec::Mock#expects and #with should fail when the SOAP body was not send
The text was updated successfully, but these errors were encountered:
This may be caused by a change in Savon::Client#preconfigure. An rspec backtrace of savon_spec indicates the problem is on line 113 of lib/savon/client.rb. Here is the line in savon 0.9.6:
soap.body = args[2].delete(:body)
On savon 0.9.2, here is the same line (line 116):
soap.body = options[2].delete(:body) if options[2][:body]
Note that in the old version body is only set if the options[2][:body] evaluates to true. I think removing this conditional breaks savon_spec. Note that the specs in savon_spec succeed when line 113 is changed like this:
soap.body = args[2].delete(:body) if args[2][:body]
With the latest savon (currently 0.9.6), savon_spec no longer works properly. Here is the output for "rspec spec":
The text was updated successfully, but these errors were encountered: