spec/spec_helper.rb in moo_moo-0.3.0 vs spec/spec_helper.rb in moo_moo-0.4.0
- old
+ new
@@ -84,15 +84,16 @@
object_name = args[1]
action_name = args[2] || method_name
match do |object|
parameters = {:the => :params, :cookie => "thecookie"}
- object.should_receive(:run_command).
+ response = double("Response", :body => {"attributes" => { :the => :attrs }})
+
+ object.should_receive(:faraday_request).
with(action_name, object_name, parameters).
- and_return("theresult")
+ and_return(response)
-
- object.send(method_name, parameters) == "theresult"
+ object.send("api_#{method_name}", parameters) == { :the => :attrs }
end
description do
"have registered service :#{method_name} delegating to action :#{action_name} and object :#{object_name}"
end
\ No newline at end of file