There are a chain of methods which gets a user
object. I am trying to mock the following to return a user
in my Factory Girl
@current_user = AuthorizeApiRequest.call(request.headers).result
I can mock the object up until the call
method but I'm stuck at mocking the result
method
allow(AuthorizeApiRequest).to receive(:call).and_return(:user)