billturner / vim-rubytest Goto Github PK
View Code? Open in Web Editor NEWThis project forked from janx/vim-rubytest
Run ruby test in vim
This project forked from janx/vim-rubytest
Run ruby test in vim
Rubytest.vim ============ Rubytest.vim is a vim (http://www.vim.org) plugin, which helps you to run ruby test (including vanilla test, rspec, shoulda etc.) in vim. Installation ------------ Copy all files to your ~/.vim directory. Usage ----- After installation, press <Leader>t will run the test under your cursor if you are editing a ruby test file. example: $ cd <your rails/merb root> $ vim test/unit/user_test.rb (move cursor into a test case, press <Leader>t) (<Leader> is mapping to '\' by default in vim) Be default, the plugin will print output in terminal. You can change this behavior by putting this line in your vimrc file: let g:rubytest_in_quickfix = 1 With this set, test errors will be displayed in quickfix window, and you can jump to the error location quickly by select the error message and hit return (or 'Ctrl-w return' to open it in new window). You can customize the command which will be used to run the test case by setting these options in your vimrc file: let g:rubytest_cmd_test = "ruby %p" let g:rubytest_cmd_testcase = "ruby %p -n '/%c/'" let g:rubytest_cmd_spec = "spec -f specdoc %p" let g:rubytest_cmd_example = "spec -f specdoc %p -e '%c'" let g:rubytest_cmd_feature = "cucumber %p" let g:rubytest_cmd_story = "cucumber %p -n '%c'" Placeholders: * `%p`: path of test file * `%c`: test case name * `%s`: only for minitest, replaced by closest suite name (class whose name begin with 'Test'). This can be used to match test case more exactly: let g:rubytest_cmd_testcase = "ruby %p -n '%s#%c'" Default Key Bindings -------------------- <Leader>t: run test case under cursor <Leader>T: run all tests in file <Leader>l: run the last test, from any buffer You can change default key bindings: map <Leader>\ <Plug>RubyTestRun " change from <Leader>t to <Leader>\ map <Leader>] <Plug>RubyFileRun " change from <Leader>T to <Leader>] map <Leader>/ <Plug>RubyTestRunLast " change from <Leader>l to <Leader>/ Tip --- * Rubytest.vim works perfectly with vim-localvimrc, which enables you to set different test run command for different projects. Check details at: https://github.com/embear/vim-localvimrc Contributors ------------ * Bogdan Gusiev * Yung Hwa Kwon (nowk) * J. Weir * Ben Simpson (bsimpson) * Alexander Belyaev (alexbel) * Ivan Tkalin (ivalkeen)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.