title: Populating instance variables in rspec tests
body: <p>I have a class which has the following initialise method.</p>
  
  <pre><code>def initialize(my_var)
    @my_var = my_var
  end
  </code></pre>
  
  <p>and I want to test the method which then does something to <code>@my_var</code></p>
  
  <pre><code>def split
    @my_var.split(",")
  end
  </code></pre>
  
  <p>how do I change <code>@my_var</code> before testing that it returns an array properly?</p>
  
  <p>Is this possible without having an accessor for <code>@my_var</code>?</p>