savonrb/savon — pull request #447 by koppen (2013-05-12 17:47:41+00:00)
Title: Allow Savon mocks to receive any message. Closes #402

Previously, there was no way to create a mock without expectation of the
specific message to be sent to the SOAP action.

Contrary to the documentation, leaving out the `with` method would result in an
expectation that the action be called without a message.

This change adds a special case to `#with` so that calling `#with(message: :any)`
ends up setting an expectation that the SOAP action be called, but
without caring about the actual message sent to the action.

This way the following will pass:

savon.expects(:authenticate).with(message: :any)
client.call(:authenticate)
client.call(:authenticate, message: { username: "luke", password: "secret" })