Mocking chain of methods in rspec : <p>There are a chain of methods which gets a <code>user</code> object. I am trying to mock the following to return a <code>user</code> in my <code>Factory Girl</code></p>

<pre><code>@current_user = AuthorizeApiRequest.call(request.headers).result
</code></pre>

<p>I can mock the object up until the <code>call</code> method but I'm stuck at mocking the <code>result</code> method</p>

<pre><code>allow(AuthorizeApiRequest).to receive(:call).and_return(:user)
</code></pre>
