Run all RSpec tests edited or added in the current branch

Posted . Visible to the public.

With this command you can run all the spec files which have been edited or added in the current branch since master:

git diff --name-only master -- ./spec | xargs -I{} rspec {} 
  • If you have several spec folders add them for path parameter after ./spec accordingly.
  • The option -I{} creates a placeholder to be replaced.
  • You can also compare edited/added specs between commits with <commit>..<commit>
Profile picture of Felix Eschey
Felix Eschey
Last edit
Felix Eschey
Keywords
main
License
Source code in this card is licensed under the MIT License.
Posted by Felix Eschey to makandra dev (2024-09-24 11:58)