forked from savonrb/savon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow Savon mocks to receive any message. Closes savonrb#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" })
- Loading branch information
Showing
3 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters