Commit d457ab8
Address review: correct the source of the include, keep it for unmapped fixtures
Two fixes from review.
The include does not come from a railtie initializer — there is none. It comes
from the `:active_support_test_case` load hook in `rails/test_help.rb`, which an
app requires from `test_helper.rb`, so it never runs during RBI generation.
Reword the comment and the manual accordingly.
The early return sat below the `select!` that drops fixture sets whose model
constant cannot be resolved, so an app with fixture files but no matching models
wrote `fixtures :all` and still got no include. Move the return above the
`select!`: apps with no fixture files at all keep generating nothing, everything
else gets the include.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent f20146c commit d457ab8
3 files changed
Lines changed: 28 additions & 7 deletions
File tree
- lib/tapioca/dsl/compilers
- manual
- spec/tapioca/dsl/compilers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
56 | | - | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
94 | 112 | | |
95 | 113 | | |
96 | 114 | | |
| |||
0 commit comments