Skip to content

Fix flaky time-based spec using be_within matcher

Dallas Reedy requested to merge dreedy-fix-flaky-rspec-time-travel-test into master

What does this MR do and why?

(Hopefully 🤞) Fixes a flaky time-based spec by using the be_within matcher and a small number of seconds:

expect(Date.current).to be_within(5.seconds).of(today + 3.days)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Resolves #345345 (closed)

Edited by Dallas Reedy

Merge request reports