Skip to content

improve spec readability#22652

Merged
myabc merged 1 commit intorelease/17.3from
fix/burndown_spec_with_timecop
Apr 3, 2026
Merged

improve spec readability#22652
myabc merged 1 commit intorelease/17.3from
fix/burndown_spec_with_timecop

Conversation

@ulferts
Copy link
Copy Markdown
Contributor

@ulferts ulferts commented Apr 2, 2026

Ticket

N/A

What are you trying to accomplish?

Work in comments in #22605

@ulferts ulferts requested a review from myabc April 2, 2026 14:20
allow(Time).to receive(:now).and_return(Time.utc(2011, "apr", 4, 20, 15, 1))
allow(Date).to receive(:today).and_return(Date.civil(2011, 4, 4))
around do |example|
Timecop.freeze(Time.utc(2011, "apr", 4, 20, 15, 1)) { example.run }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rails now provides freeze_time so no need for Timecop.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ulferts I'll switch this to travel_to.

@myabc myabc force-pushed the fix/burndown_spec_with_timecop branch from aa6cdbc to 0b45f52 Compare April 3, 2026 16:19
@myabc myabc self-requested a review April 3, 2026 16:19
@myabc myabc merged commit e530719 into release/17.3 Apr 3, 2026
16 of 17 checks passed
@myabc myabc deleted the fix/burndown_spec_with_timecop branch April 3, 2026 17:52
@github-actions github-actions bot locked and limited conversation to collaborators Apr 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants