spec/savon/client_spec.rb in johnreitano-savon-0.7.2.1 vs spec/savon/client_spec.rb in johnreitano-savon-0.7.7.1
- old
+ new
@@ -35,11 +35,11 @@
@client.authenticate.should be_a(Savon::Response)
end
it "should disable the Savon::WSDL when passed a method with an exclamation mark" do
@client.wsdl.enabled?.should be_true
- [:respond_to?, :operations, :namespace_uri, :soap_endpoint].each do |method|
+ [:operations, :namespace_uri, :soap_endpoint].each do |method|
Savon::WSDL.any_instance.expects(method).never
end
response = @client.authenticate! do |soap|
soap.input.should == "authenticate"
@@ -68,10 +68,14 @@
soap.should be_a(Savon::SOAP)
wsse.should be_a(Savon::WSSE)
end
end
+ it "should have a call method that forwards to method_missing for SOAP actions named after existing methods" do
+ @client.call(:authenticate) { |soap| soap.should be_a(Savon::SOAP) }
+ end
+
it "should raise a NoMethodError when the method does not match an available SOAP action or method" do
lambda { @client.some_undefined_method }.should raise_error(NoMethodError)
end
-end
+end
\ No newline at end of file