Skip to content

Instantly share code, notes, and snippets.

View dakennguyen's full-sized avatar

Khoa Nguyen dakennguyen

  • Munich
View GitHub Profile
@dakennguyen
dakennguyen / README.md
Last active September 11, 2021 11:03
Run `rspec` for only changed files

Description

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.

Installation

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"