Sha256: 4ed2fcefb6bb40d6b66a79aa3af5855c44a7177076e58bc434d3abcac626aa71
Contents?: true
Size: 917 Bytes
Versions: 1
Compression:
Stored size: 917 Bytes
Contents
require "spec_helper" describe Shapewear do describe "usage with SOAP clients" do before do stub_request(:get, "http://services.example.com/complete/soap/wsdl") \ .to_return :body => CompleteService.to_wsdl, :headers => {'Content-Type' => 'application/xml'} stub_request(:post, "http://services.example.com/complete/soap") \ .to_return :body => lambda { |r| CompleteService.serve(r) }, :headers => {'Content-Type' => 'application/xml'} end it "should work with Savon" do client = Savon::Client.new 'http://services.example.com/complete/soap/wsdl' response = client.request :echo_in_uppercase, :xmlns => 'http://services.example.com/v1' do soap.body = {:text => 'uppercase text'} end puts response.inspect puts response.body.inspect response.body[:echo_in_uppercase_response][:body].should == 'UPPERCASE TEXT' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shapewear-0.0.3 | spec/shapewear/savon_usage_spec.rb |