spec/savon/wsdl/request_spec.rb in savon-0.9.2 vs spec/savon/wsdl/request_spec.rb in savon-0.9.3

- old
+ new

@@ -2,11 +2,19 @@ describe Savon::WSDL::Request do let(:http_request) { HTTPI::Request.new :url => Endpoint.wsdl } let(:request) { Savon::WSDL::Request.new http_request } + describe ".execute" do + it "executes a WSDL request and returns the response" do + response = HTTPI::Response.new 200, {}, Fixture.response(:authentication) + HTTPI.expects(:get).with(http_request).returns(response) + Savon::WSDL::Request.execute(http_request).should == response + end + end + describe "#response" do - it "execute an HTTP GET request and return the HTTPI::Response" do + it "executes an HTTP GET request and returns the HTTPI::Response" do response = HTTPI::Response.new 200, {}, Fixture.response(:authentication) HTTPI.expects(:get).with(http_request).returns(response) request.response.should == response end end