Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alias hardcoded commands as official test commands #245

Closed
AlexB52 opened this issue Jan 23, 2025 · 0 comments · Fixed by #246
Closed

Alias hardcoded commands as official test commands #245

AlexB52 opened this issue Jan 23, 2025 · 0 comments · Fixed by #246
Labels
enchancements New feature or request

Comments

@AlexB52
Copy link
Owner

AlexB52 commented Jan 23, 2025

When retest is used with custom bin commands like bin/test <test>, retest will default to a hardcoded command that will not support running all tests nor run forced selection of tests or differ branches.

This issue will reuse the options available on retest like --rspec, --rake, --rails and link them to hardcoded command if specified

Example:

$ retest --rspec "bin/test <test>" should follow rspec rules around batching test files or run all the specs like this:

  • run all: bin/test
  • run multiple: bin/test path1_spec.rb path2_spec.rb
  • run one test: bin/test path1_spec.rb

Note, --rails option should work just like --rspec option.

Similarly:

$ retest --rake "bin/test TEST=<test>" should follow rake rules around batching test files or run all the specs like this:

  • run all: bin/test
  • run multiple: bin/test TEST={path1_spec.rb,path2_spec.rb}
  • run one test: bin/test TEST=path1_spec.rb

Finally

$ retest --ruby "bin/test <test>" should follow ruby rules around batching test files or run all the specs like this:

  • run all: raise Exception
  • run multiple: bin/test -e "require './a/file/path.rb';require './another/file/path.rb';"
  • run one test: bin/test a/file/path.rb
@AlexB52 AlexB52 added the enchancements New feature or request label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enchancements New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant