Skip to content

Pin the Today-label spec to midday - #165

Merged
wmwolf merged 1 commit into
masterfrom
fix-midnight-age-spec
Dec 2, 2026
Merged

wmwolf merged 1 commit into
masterfrom
fix-midnight-age-spec

Conversation

@wmwolf

@wmwolf wmwolf commented Dec 2, 2026

Copy link
Copy Markdown
Member

What

spec/helpers/commits_when_spec.rb's "uses present-tense labels when measured from now" example now runs inside travel_to(<a fixed midday>) { ... }.

Why

The example built a commit at 1.hour.ago and expected the "Today" bucket. The app runs on UTC, so during the first hour of a UTC day (6–7 PM US Central) "an hour ago" is yesterday. The helper correctly said "Yesterday", and the spec failed depending on when the suite ran. The app code is unchanged.

Testing

The file's 5 examples pass. The failure reproduced locally at 00:31 UTC.

🤖 Generated with Claude Code

It built a commit at 1.hour.ago and expected Today, so it failed whenever the suite ran in the first hour of a UTC day (6-7 PM Central), when an hour ago is yesterday.
@wmwolf
wmwolf enabled auto-merge December 2, 2026 00:42
@wmwolf
wmwolf merged commit 94618ee into master Dec 2, 2026
1 check passed
@wmwolf
wmwolf deleted the fix-midnight-age-spec branch December 2, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant