title: Getting NameError: `format' is not allowed as an instance variable name when testing instance variable with rspec
body: <p>I have the following test:   </p>
  
  <pre><code>let(:client) { Descat::Client.new }
  
  describe 'poblacio' do
    it 'should set format correctly' do
      client.poblacio('v1','json','dades')
      expect (client.instance_variable_get(:format)).to eq('json')
    end
  end
  </code></pre>
  
  <p>And I have the following code that is being tested:</p>
  
  <pre><code>module Descat
    class Client
      BASE_URL = 'http://api.idescat.cat/'
  
      def initialize(attributes = {})
        attributes.each do |attr, value|
          self.send("#{attr}=", value)
        end
      end
  
      def poblacio(version, format, operation, *args)
        @format = format
      end
    end
  end
  </code></pre>
  
  <p>WHen running the tests I keep getting '</p>
  
  <pre><code>Failure/Error: expect (client.instance_variable_get(:format)).to eq('json')
       NameError:
  </code></pre>
  
  <p>But, changing the name doesnt help.</p>
  
  <p>'</p>