Repository navigation
Conversation
Rails loads classes by name, so no require or quoted path links app/models/user.rb to spec/models/user_spec.rb. In a Rails repo every app/ file had no test lane, and the starter draft matched specs by name fragments instead (api.rb drafted every spec that mentions "api"). A spec at spec/<path>_spec.rb now selects app/<path>.rb and <path>.rb (so spec/lib/x_spec.rb selects lib/x.rb) when that file exists, beside the existing bin/ convention. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
Thanks @ikraamg. The idea sits naturally next to pregate's existing |
|
Thank you for this. We're picking up the idea. A maintainer agent working through a batch of fixes (our tracking thread GSTA-805) will first reproduce the problem on current main. If it reproduces, the agent rebuilds the fix on main with you credited as co-author, because we don't merge outside branches directly, and we'll close this PR with a link when it lands. If it no longer reproduces, we'll close this and say what changed. Other work on the same pregate files has to land first, so this may take a few days. |
Test selection now follows a TypeScript import written with the emitted extension (./x.js for x.ts) to its source, and maps a Rails file under app/ or lib/ to its RSpec spec by path, so these files no longer report no test lane. Fixes #4398; rebuilt from #4401 and #4211. Co-authored-by: mikhailsal <[email protected]> Co-authored-by: Ikraam Ghoor <[email protected]> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…4679) In TypeScript repos that import `./x.js` for `x.ts` (NodeNext) and in Rails repos, touched source files now get their tests instead of none. Why: `/verify` and `/ship` found no tests for these files even though tests covered the files (#4398, #4211). Nothing to do: a Rails file maps only when its spec exists at the conventional path. Co-authored-by: mikhailsal <[email protected]> Co-authored-by: Ikraam Ghoor <[email protected]> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1v/adversarial-native#1 reader=adversarial-native Review-Finding: p1v/adversarial-native#2 reader=adversarial-native Review-Finding: p1v/adversarial-native#3 reader=adversarial-native Review-Finding: p1v/outside-voice#2 reader=outside-voice Review-Finding: p1v/outside-voice#3 reader=outside-voice
Rails loads classes by name, so a spec never requires the file it tests, and pregate gave every
app/file in a Rails repo no test lane.spec/<path>_spec.rbnow selectsapp/<path>.rb, andspec/lib/<path>_spec.rbselectslib/<path>.rb, when that file exists. It sits beside the existingbin/<name>convention.app/services/plugins/netatmo_weather_station/api.rbused to report no lane, and the starter drafted 10+ unrelated specs that mention "api". It now selectsspec/services/plugins/netatmo_weather_station/api_spec.rb(convention).test/pregate-rspec-convention.test.ts, including the case where no spec exists.🤖 Generated with Claude Code