Repository navigation
microskills: read bin/rails test as a test run - #377
Open
Lanre Shittu (Shizoqua) wants to merge 1 commit into
Open
Lanre Shittu (Shizoqua) wants to merge 1 commit into
Lanre Shittu (Shizoqua) wants to merge 1 commit into
Conversation
Rails runs a project's tests with bin/rails test, and one folder's with test:system, test:all and the rest. The loop guard counts rails test as a test run, but the observer did not observe it at all, so a Rails session's test runs taught nothing. It is now a test run in the generic reading, with the form as it was called (bin/rails test, rails test, bundle exec rails test).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The observer did not observe
bin/rails testat all, while the loop guard countsrails testas a test run (since #209). Rails runs a project's tests withbin/rails test [PATHS...], and one folder's withbin/rails test:system,test:alland the rest, so a Rails app's test runs taught the micro-skills nothing, though their minitest summaries already read as tests that ran. In an app whererailsis not on PATH andbin/rails testpasses, the FormRepair fact namingbin/rails testwas never learned.Fix: in the generic reading,
rails testandrails test:<folder>are a test run with the form as it was called (bin/rails test,rails test,bundle exec rails test,bin/rails test:system), the path kept as for other runners, sincerailsandbin/railsare different ways to run it. The other Rails commands (server,db:migrate,generate,console) are not observed, as before, and the Python vocabulary is unchanged. Over the 5,974 strings in the test suites, only the tworails testcommands in the loop guard's own tests are classified differently, each now as a test run.Tests, in a new
tests/test_observe_rails_test.py:bin/rails test,rails test, with paths,test:system,test:all, behindbundle exec, aRAILS_ENV=testor acd, is a test run with its form, as the loop guard reads it (fail on main);railsis not on PATH andbin/rails testpasses teach the fact that namesbin/rails test(fails on main).The skips need Windows, a real agent CLI (Codex, Hermes, opencode) or aider, or a non-root user.
Fixes #376