title: Rails - Rspec error: no implicit conversion
body: <p>I'm testing a model that receives a optional parameter and Rspec is giving me an error:</p>
  
  <pre><code>no implicit conversion of Symbol into Integer
  </code></pre>
  
  <p>My route:</p>
  
  <pre><code>get "classification/teams(/:team_id)" =&gt; "classifications#teams"
  </code></pre>
  
  <p>My model:</p>
  
  <pre><code>class Classification
  def self.teams(params = [])
      team_id = params[:team_id] unless params[:team_id].nil?
      ...
  </code></pre>
  
  <p>My test:</p>
  
  <pre><code>it 'returns the classification' do
      expect(Classification.teams).to be_true
  end
  </code></pre>
  
  <p>My API is working well, but I need to implement some tests and I'm getting this error.
  If I change params[:team_id] for params['team_id'] the error occurs but with: no implicit conversion of String into Integer.</p>