Run current spec inside adjacent tmux window.
https://asciinema.org/a/87H9t5YcD243QtXSwK7n8xsSg/
Install using your favorite package manager, or use Vim's built-in package support:
cd ~/.vim/bundle
git clone git://github.com/bpolly/vim-ttr.git
Place this in your .vimrc:
Plug 'bpolly/vim-ttr'
Then run the following in Vim:
:source %
:PlugInstall
" .vimrc
" Set this variable to 1 to clear the terminal contents before each test run.
let g:clear_screen_before_test_run = 1
" The default rspec command is `bundle exec rspec` but can be overwritten with this:
let g:rspec_command = `custom rspec command`
" Prefer bin/rspec if it is available:
let g:use_spring = 1
" cd into the app's base directory before running spec:
let g:vttr_change_directories = 1
" By default there are no keyboard mappings. Map them like so:
noremap <Leader>f :RSpecFile<CR>
noremap <Leader>l :RSpecLine<CR>
noremap <Leader>x :RSpecFailures<CR>