Sha256: dd4d4ad4c3ce059ebf3d3f118646fa5c8b8e9e2056b09fb5234b759a75b8f5b1

Contents?: true

Size: 839 Bytes

Versions: 27

Compression:

Stored size: 839 Bytes

Contents

 require "spec_helper"

describe "RATP example" do

  it "retrieves information about a specific station" do
    client = Savon.client do
      # The WSDL document provided by the service.
      wsdl "http://www.ratp.fr/wsiv/services/Wsiv?wsdl"

      # Lower timeouts so these specs don't take forever when the service is not available.
      open_timeout 10
      read_timeout 10

      # Disable logging for cleaner spec output.
      log false
    end

    # XXX: the service seems to rely on the order of arguments.
    #      try to fix this with the new wsdl parser.
    response = call_and_fail_gracefully(client, :get_stations) do
      message(:station => { :id => 1975 }, :limit => 1)
    end

    station_name = response.body[:get_stations_response][:return][:stations][:name]
    expect(station_name).to eq("Cite")
  end

end

Version data entries

27 entries across 27 versions & 4 rubygems

Version Path
savon-2.12.1 spec/integration/ratp_example_spec.rb
savon-2.12.0 spec/integration/ratp_example_spec.rb
savon-2.11.2 spec/integration/ratp_example_spec.rb
savon-SU-2.11.1b spec/integration/ratp_example_spec.rb
savon-SU-2.11.1 spec/integration/ratp_example_spec.rb
savon-2.11.1 spec/integration/ratp_example_spec.rb
savon-2.11.0 spec/integration/ratp_example_spec.rb
savon-2.10.1 spec/integration/ratp_example_spec.rb
savon-2.10.0 spec/integration/ratp_example_spec.rb
savon-2.9.0 spec/integration/ratp_example_spec.rb
savon-2.8.1 spec/integration/ratp_example_spec.rb
savon-2.8.0 spec/integration/ratp_example_spec.rb
savon-2.7.2 spec/integration/ratp_example_spec.rb
savon-2.7.1 spec/integration/ratp_example_spec.rb
savon-2.7.0 spec/integration/ratp_example_spec.rb
savon-2.6.0 spec/integration/ratp_example_spec.rb
savon-2.5.1 spec/integration/ratp_example_spec.rb
savon-2.5.0 spec/integration/ratp_example_spec.rb
savon_with_adapter-2.4.1 spec/integration/ratp_example_spec.rb
savon-2.4.0 spec/integration/ratp_example_spec.rb