title: RSpec in simple class with an error: please stub a default value first
body: <p>I want to test simple class which iterate through array of hashes and return only those with status <code>Pending</code> which were updated more than 2 days ago.</p>
  
  <p><code>fetch_pending.rb</code></p>
  
  <pre><code>  class FetchPending
      PROJECT_KEY = 'TPFJT'
      TWO_DAYS = Time.now - 2 * 24 * 60 * 60
  
      def call
        project.select do |issue|
          issue.fields.dig('status', 'name') == 'Pending' &amp;&amp;
            DateTime.parse(issue.fields.dig('updated')) &lt; TWO_DAYS
        end
      end
  
      private
  
      def project
        @project ||= Jira::ProjectConnection.new(PROJECT_KEY).call
      end
    end
  </code></pre>
  
  <p><code>specs</code></p>
  
  <pre><code>RSpec.describe FetchPending do
    subject { described_class.new }
  
    let(:project_key) { 'TSW-123' }
    let(:project_hash) do
      [
        {
          'key': 'TP-47',
          'fields': {
            'status': {
              'name': 'Pending'
            },
            'assignee': {
              'name': 'michael.kelso',
              'emailAddress': 'michael.kelso@example.com'
            },
            'updated': '2020-02-19T13:20:50.539+0100'
          }
        }
      ]
    end
    let(:project) { instance_double(Jira::ProjectConnection) }
  
    before do
      allow(Jira::ProjectConnection).to receive(:new).with('TSW-123').and_return(project)
      allow(project).to receive(:call).and_return(project_hash)
    end
  
    it 'return project hash' do
      expect(subject.call).include(key[:'TP-47'])
    end
  </code></pre>
  
  <p>But I've got an error:</p>
  
  <pre><code>Failure/Error: expect(subject.call).include(key[:'TP-47'])
  
     #&lt;Jira::ProjectConnection (class)&gt; received :new with unexpected arguments
       expected: ("TSW-123")
            got: ("TPFJT")
      Please stub a default value first if message might be received with other args as well.
  </code></pre>
  
  <p>I've got the same issue in few other specs, how to stub this variable? should I do the same ith <code>TWO_DAYS</code> ?</p>