You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix multi-step jump for months of different length
Whenever we'd travel more than one month into the future or into the
past in a test fixture, the day of month would end up being that of the
shortest month in between start and end month. For example, if the
current date was '2019-03-29', then jumping two months back would yield
'2019-01-28' instead of '2019-01-29' because February only has 28 days
in 2019. This would lead to unexpected results in test fixtures.
This commit fixes the issue by removing the timetravel() method and
replacing it with native calls to Ruby's :next_month or :prev_month
which, surprisingly, can take arguments, e.g. :next_month(2) to jump two
months forward, rendering the timetravel() method obsolete.
0 commit comments