title: RSpec: how to set a controller's instance variable
body: <p>I have a this method in my rails controller:</p>
  
  <pre><code>def some_init_func
    # ...
    @inst_var = 1
    # ...
  end
  </code></pre>
  
  <p>and later on:</p>
  
  <pre><code>do_something_with(@inst_var)
  </code></pre>
  
  <p>How do I set this instance variable in RSpec?</p>
  
  <pre><code>allow(controller).to receive(:some_init_func) do
    # ???? what goes here ????
  end
  </code></pre>