spec/savon/model_spec.rb in savon_model-0.1.2 vs spec/savon/model_spec.rb in savon_model-0.2.0
- old
+ new
@@ -32,11 +32,11 @@
model.client.wsdl.namespace.should == "http://v1.example.com"
end
end
describe ".actions" do
- before(:all) { model.actions :get_user, :get_all_users }
+ before(:all) { model.actions :get_user, "GetAllUsers" }
it "should define class methods each action" do
model.should respond_to(:get_user, :get_all_users)
end
@@ -46,9 +46,14 @@
context "(class-level)" do
it "should execute SOAP requests with a given body" do
model.client.expects(:request).with(:wsdl, :get_user, :body => { :id => 1 })
model.get_user :id => 1
+ end
+
+ it "should accept and pass Strings for action names" do
+ model.client.expects(:request).with(:wsdl, "GetAllUsers", :body => { :id => 1 })
+ model.get_all_users :id => 1
end
end
context "(instance-level)" do
it "should delegate to the corresponding class method" do