Inside your git repository, find all modified files since your base commit. If said file is a spec file, run rspec for it. If it is a source file, find spec file by vim-projectionist
, and then run rspec automatically.
You have to setup spec file as source file's alternate, either by setting up g:projectionist_heuristics
in your vimrc or creating a .projections.json
in the root of the project.
For example:
"app/*.rb": {
"alternate": "spec/{}_spec.rb"
}
For more details on how to setup projectionist
please refer to: https://github.com/tpope/vim-projectionist