New AvoidTimeNew cop
What does this Merge Request do and why?
This MR adds a new RuboCop cop called AvoidTimeNew
which discourages the use of Time.new
because the ActiveSupport::Testing::TimeHelpers.freeze_time
helper does not stub this method.
Merge Request checklist
-
This change is backward compatible. If not, please include steps to communicate to our users. -
Tests added for new functionality. If not, please raise Issue to follow-up. -
Documentation added/updated, if needed. -
gdk doctor
test added, if needed. -
Add the ~highlight
label if this MR should be included in theCHANGELOG.md
.
Closes #1212 (closed)