thoughtbot / vim-rspec

Run Rspec specs from Vim
https://robots.thoughtbot.com
MIT License
657 stars 108 forks source link

Track last spec line separately from last file #79

Closed thorncp closed 9 years ago

thorncp commented 9 years ago

Updates RunNearestSpec to always run the last nearest spec, and RunCurrentSpecFile to always run the last entire file.

An example workflow:

  1. Write a test, run only it with <leader>s (RunNearestSpec)
  2. Switch to source file, implement change, run single test again with <leader>s (RunNearestSpec)
  3. While still in the source file, run the entire test file with <leader>t (RunCurrentSpecFile)
  4. Profit

I've never used vspec before, so there's probably some jankiness there that could be cleaned up. Any feedback about it or Vimscript best practices would be amazing :heart_eyes:.

gylaz commented 9 years ago

Looks good to me.