Commit 08b3ec7
committed
Fix eager loading: name the file after its constant
The eager-load gate caught this on its own author: the file was
field_format.rb while the class is DatetimeFormat, so Zeitwerk expected
RedmineIssueDatetime::FieldFormat and a production boot would have died
with a NameError. Every test passed, because test and development load
lazily - exactly the gap the gate exists for, and the same shape as
karida-org/redmine_gtt_sync#81.
Renamed to datetime_format.rb, with a comment so the next person does not
reintroduce it. Also restores the previous User.current in the test
teardown rather than assuming it was nil.1 parent b12b41a commit 08b3ec7
3 files changed
Lines changed: 11 additions & 4 deletions
File tree
- lib
- redmine_issue_datetime
- test/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
88 | 91 | | |
89 | | - | |
| 92 | + | |
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
93 | 96 | | |
94 | 97 | | |
95 | | - | |
96 | | - | |
| 98 | + | |
| 99 | + | |
97 | 100 | | |
98 | 101 | | |
99 | 102 | | |
| |||
0 commit comments