- Run the test/spec your cursor is currently on
- Run the context your cursor is currently in
- Run the entire test/spec you are working in
- Streaming output to tmux via vimux
This plugin currently supports
- test/unit
- dust
- rspec
- shoulda
Use any of the commands below. Map them to shortcuts in your .vimrc for easy access.
- RunRubyFocusedTest - run focused test/spec
- RunRailsFocusedTest - run focused test (no spec support) in a Rails app
- RunRubyFocusedContext - run current context (rspec, shoulda)
- RunAllRubyTests - run all the tests/specs in the current file
You can also use the following settings in .vimrc to configure the command used to run ruby tests:
let g:vimux_ruby_cmd_unit_test = "bundle exec ruby"
let g:vimux_ruby_cmd_all_tests = "testdrb"
let g:vimux_ruby_cmd_context = "FOO=bar ruby"
By default, vim-ruby-test clears the tmux pane in which the command is run. You can configure this behavior:
let g:vimux_ruby_clear_console_on_run = 0
By default, vim-ruby-test uses the absolute path for file arguments. You can configure it to instead use relative paths with:
let g:vimux_ruby_file_relative_paths = 1
Put the contents of this directory into your pathogen bundle. That's it!
- vim with ruby support (compiled +ruby)
- vimux >= 0.3.0