Commit 65c8789
Add "Prefer
Since there are several ways to indicate the current time,
we believe that `freeze_time`,
which can be expressed as simply as possible, should be preferred.
```ruby
# bad
travel_to(Time.now)
travel_to(DateTime.now)
travel_to(Time.current)
travel_to(Time.zone.now)
travel_to(Time.now.in_time_zone)
travel_to(Time.current.to_time)
# good
freeze_time
```freeze_time over travel_to with an argument of the current time" rule1 parent 6bfbf8a commit 65c8789
1 file changed
+18
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1791 | 1791 | | |
1792 | 1792 | | |
1793 | 1793 | | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
1794 | 1812 | | |
1795 | 1813 | | |
1796 | 1814 | | |
| |||
0 commit comments