title: and sometimes I get failed spices because of Time.now, can't understand why
body: <p>so i have a method in model</p>
  
  <pre><code>class &lt;&lt; self
    def last_week
      start = Time.zone.now.beginning_of_week - 7.days
      finish = start + 7.days
      where('appointment_at &gt;= ? AND appointment_at &lt; ?', start, finish).order(appointment_at: :desc)
    end
  end
  </code></pre>
  
  <p>And I write spec for this method.</p>
  
  <pre><code>RSpec.describe Appointment, type: :model, vcr: { record: :none } do
    let!(:time) { Time.now }
    let(:appointment_at) { time }
  
    context '.last_week' do
      let!(:scoped_appointment) { create(:appointment, appointment_at: time - 2.days) }
      let!(:another_appointment) { create(:appointment, appointment_at: time - 16.days) }
  
      it do
        travel_to(time) do
          expect(Appointment.last_week).to include(scoped_appointment)
          expect(Appointment.last_week).not_to include(another_appointment)
        end
      end
    end
   end
  </code></pre>
  
  <p>And sometime i get failed this spec with error.</p>
  
  <pre><code>expected #&lt;ActiveRecord::Relation []&gt; to include #&lt;Appointment id: 18, lead_id: 27, body: nil, appointment_at: "2019-02-25 00:59:47", google_id: nil, ... "pending", user_id: 22, notify: nil, cc_emails: nil, appointment_minutes: nil, status_message: nil&gt;
     Diff:
     @@ -1,2 +1,2 @@
     -[#&lt;Appointment id: 18, lead_id: 27, body: nil, appointment_at: "2019-02-25 00:59:47", google_id: nil, created_at: "2019-02-27 00:59:47", updated_at: "2019-02-27 00:59:47", timezone: nil, subject: "Meeting with Lead", address: nil, notification: nil, status: "pending", user_id: 22, notify: nil, cc_emails: nil, appointment_minutes: nil, status_message: nil&gt;]
     +[]
  </code></pre>
  
  <p>I can't understand why?</p>
  
  <p>And I have a suggestion that I should tightly set <code>time</code></p>
  
  <p>in <code>spec_helper.rb</code> </p>
  
  <pre><code>$now = DateTime.parse('2020-01-01 00:00:01 -0500')
  </code></pre>
  
  <p>will it be right? and why ?</p>