savon icon indicating copy to clipboard operation
savon copied to clipboard

Testing documentation not correct

Open petertellgren opened this issue 3 years ago • 4 comments

Bug report

When I tried to use the Savon::SpecHelper I could not get it to work so I resorted to setting up an example project following the documentation found here. Unfortunately following the docs I ran into other issues rather than my real project issues so I thought I'd raise them here to see if we can help fix the documentation and eventually get to my real problem :)

Current behavior:

  1. Running code from Testing documentation results in ArugmentError
  2. Addressing Argument Error causes NoMethodError

Steps to reproduce current behavior: to reproduce the initial error:

git clone [email protected]:petertellgren/savon-spec-bug.git
cd savon-spec-bug
bundle install
bundle exec rspec

to reproduce the subsequent error:

git checkout step-2
bundle exec rspec

Expected behavior: Passing tests

System information:

  • ruby version: 2.7.3
  • savon version: 2.12.1

petertellgren avatar Jun 15 '21 11:06 petertellgren

👋 There is a repo https://github.com/savonrb/savonrb.github.io which has the text for the website.

Any output examples you can offer in the Description would help people wanting to help out fixing this!

olleolleolle avatar Jun 15 '21 11:06 olleolleolle

https://github.com/savonrb/savonrb.github.io/blob/master/version2/testing.md this is the page

Now I have attempted to run the example.

The step-2 branch is using the correct arguments, the first Symbol being the name of an operation to call on the WSDL-located service.


 def authenticate(message)
   @client.call(:authenticate, message: message)
 end

Now, the WSDL document describing operations is not valid, that is, "http://example.com?wsdl" being passed to the client, it needs to be a real WSDL description of operations. The text is perhaps not clear about the fact that that line is a non-functioning example WSDL.

The docs could need updating with:

  • FIX a note about which "operation" to run from the WSDL, avoiding the ArgumentError
  • perhaps a note about the fixture XML files with expected results

olleolleolle avatar Jul 28 '21 07:07 olleolleolle

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 08 '22 23:01 stale[bot]

it needs to be a real WSDL description of operations

Thanks for this message, I was indeed not really aware of it and lost half an hour.

benjamin-ltr avatar Jan 12 '22 10:01 benjamin-ltr