Commit 23708a4
Fix critical missing StringIO require and test stubbing issues
This commit addresses critical issues identified in code review:
1. **Add missing StringIO require** (BLOCKER)
- Added `require "stringio"` at line 4
- Required for capture_output method at line 91
- Without this, code fails at runtime in silent mode with:
NameError: uninitialized constant StringIO
2. **Fix inconsistent system call stubbing in tests**
- Updated "when not in Bundler context" tests to match actual implementation
- Changed from string form: `system("bundle exec rake...")`
- To array form: `system("bundle", "exec", "rake", ...)`
- Silent mode now correctly stubs with File::NULL options
- This matches the actual implementation at lines 116-121
3. **Fix Rails fallback test stubbing**
- Updated "when Rails is not available" test
- Now uses correct array form system call signature
All tests pass (10 examples, 0 failures)
RuboCop passes with no offenses
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent d3fd6cb commit 23708a4
File tree
2 files changed
+22
-11
lines changed- lib/react_on_rails/dev
- spec/react_on_rails/dev
2 files changed
+22
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
119 | | - | |
| 120 | + | |
| 121 | + | |
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
123 | | - | |
124 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
129 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
130 | 136 | | |
131 | 137 | | |
132 | 138 | | |
133 | | - | |
134 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
135 | 143 | | |
136 | 144 | | |
137 | 145 | | |
| |||
148 | 156 | | |
149 | 157 | | |
150 | 158 | | |
151 | | - | |
152 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
153 | 162 | | |
154 | 163 | | |
155 | 164 | | |
156 | 165 | | |
157 | | - | |
| 166 | + | |
| 167 | + | |
158 | 168 | | |
159 | 169 | | |
160 | 170 | | |
| |||
0 commit comments