title: Trying to stub chained methods for a model in Rspec 3
body: <p>I am really new to Rspec and tried to find my answer, but it keeps on pointing me to use stub_chain, but it seems like it is deprecated on Rspec3. I have the following I am trying to stub:</p>
  
  <pre><code>active_automation = Client.automation_active_status.new_client
  </code></pre>
  
  <p>Where Client is my model and <code>automation_active_status</code> is the following in my Client model </p>
  
  <pre><code>scope :automation_active_status, -&gt; { where(automation_status: true) }
  </code></pre>
  
  <p>new_client is an attribute I want to call to further filter my result</p>
  
  <p>I tried to implement stub_chain but that did not work. My goal is to get the following to work:</p>
  
  <pre><code>Client.any_instance( black_box_I_can_not_figure_out ).returns[something]
  </code></pre>
  
  <p>Thank you.</p>