Sha256: 8a7e04ff4a8b72dad275a9b3cbef8327f80759d483ea659188d227a0c95d9d1d
Contents?: true
Size: 1.13 KB
Versions: 9
Compression:
Stored size: 1.13 KB
Contents
require "spec_helper" describe Savon::Wasabi::Document do context "with a remote document" do before do response = HTTPI::Response.new 200, {}, Fixture.wsdl(:authentication) HTTPI.stubs(:get).returns(response) end it "should resolve via HTTP" do wsdl = Savon::Wasabi::Document.new("http://example.com?wsdl") wsdl.xml.should == Fixture.wsdl(:authentication) end it "should resolve via HTTPS" do wsdl = Savon::Wasabi::Document.new("https://example.com?wsdl") wsdl.xml.should == Fixture.wsdl(:authentication) end end context "with a local document" do before do HTTPI.expects(:get).never end it "should read the file" do wsdl = Savon::Wasabi::Document.new("spec/fixtures/wsdl/authentication.xml") wsdl.xml.should == Fixture.wsdl(:authentication) end end context "with raw XML" do before do HTTPI.expects(:get).never File.expects(:read).never end it "should use the raw XML" do wsdl = Savon::Wasabi::Document.new Fixture.wsdl(:authentication) wsdl.xml.should == Fixture.wsdl(:authentication) end end end
Version data entries
9 entries across 9 versions & 4 rubygems