spec/savon/service_spec.rb in rubiii-savon-0.2.3 vs spec/savon/service_spec.rb in rubiii-savon-0.2.4
- old
+ new
@@ -4,14 +4,21 @@
include SpecHelper
# initialize
describe "initialize" do
it "raises an ArgumentError when called with an invalid endpoint" do
- ["", nil, "invalid", 123].each do |arg|
- lambda { Savon::Service.new(arg) }.should raise_error(ArgumentError)
+ ["", nil, "invalid", 123].each do |argument|
+ lambda { Savon::Service.new(argument) }.should raise_error(ArgumentError)
end
end
+
+ it "raises an ArgumentError when called with an invalid version" do
+ ["", nil, "invalid", 123].each do |argument|
+ lambda { Savon::Service.new("http://example.com", argument) }.
+ should raise_error(ArgumentError)
+ end
+ end
end
# wsdl
describe "wsdl" do
before { @service = new_service_instance }
@@ -40,10 +47,10 @@
it "returns the content of the response starting at a custom XPath" do
@service.find_user(nil, "//email").should == "thedude@example.com"
end
- it "returns nil if a given XPath does not match anything in the SOAP response" do
+ it "returns nil if a given XPath does not match anything from the SOAP response" do
@service.find_user(nil, "//doesNotMatchAnything").should be_nil
end
it "raises a Savon::SOAPFault in case of a SOAP fault" do
@service = new_service_instance(:soap_fault => true)