yield to a block using rr
问题 I'm trying to test the following code using rr : response = RestClient.get(url, {:params => params}){|response, request, result| response } In vanilla rspec , you would do something like this: RestClient.should_receive(:get).with(url, {:params => params}).and_yield(response, request, result) How would I do the same with rr ? Setup: let(:url) { "http://localhost/" } let(:params) { {:item_id => 1234, :n => 5} } let(:response) { Object.new } let(:request) { Object.new } let(:result) { Object.new