title: Rspec: How to assign instance variable in controller spec
body: <pre><code>class TestController &lt; AplicationController
    #....
  
    private
  
    def some_method
      unless @my_variable.nil?
        #...
        return true
      end
    end
  end
  </code></pre>
  
  <p>I want to test <code>some_method</code> directly in controller spec:</p>
  
  <pre><code>require 'spec_helper'
  
  describe TestController do
    it "test some_method"
      phone = Phone.new(...)
      controller.assign(:my_variable,phone) #does not work
      controller.send(:some_method).should be_true
    end
  end
  </code></pre>
  
  <p>How I can set <code>TestController</code> instance variable <code>@my_variable</code> from controller spec?</p>