-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add extra spec for time offsets / frozen time #2346
Conversation
2cabe68
to
33188f6
Compare
@@ -33,6 +33,8 @@ def self.find(_id) | |||
end | |||
|
|||
RSpec.describe "ActiveJob matchers", skip: !RSpec::Rails::FeatureCheck.has_active_job? do | |||
include ActiveSupport::Testing::TimeHelpers if defined?(ActiveSupport::Testing::TimeHelpers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When it might not be available exactly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rails 5.0 and 5.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean it's clear that freeze_time
isn't part of it, but TimeHelpers should be always available, and it's not necessary to check if they are defined (I hope we're requiring them somewhere).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh ok, I was just checking freeze_time
feel free to open a PR if you'd like to improve it, maybe backfill an implementation fir freeze_time
if you have time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
backfill an implementation for freeze_time
Noway! :D
If just for tests - it's kind of useless since we already run those specs against Rails that have it. For usage in tests - there's TimeCop (god forgive me) - wouldn't dare to write yet another one we'll have to support.
LGTM. I am looking for the sprockets bumping issue on the CI. |
Add extra spec for time offsets / frozen time
No description provided.