Know what errors lurk in your code? Rollbar detects and alerts you when code breaks in production. Get the stack trace, code, and data to help you d̶e̶b̶u̶g̶ defeat Ruby errors. Learn more.

RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Running Specs From Vim

Test driven development thrives on a tight feedback loop. However, switching from the editor to the shell to manually run specs is inefficient.

Tools such as autotest and guard run specs whenever a file gets saved. Although an improvement over a manual workflow, those approaches often run the suite when not needed and run too many or too few specs.

Enter vim-rspec, a lightweight vim plugin that runs specs directly from within vim with the press of a key.

Comments

Your post is so interesting and informative. I got a lot of useful and significant information. Thank you so much.

For those, who use not only RSpec, but Test::Unit or Minitest and write code in vim: I put together a very similar vim plugin - Related.vim. It allows not only running tests, but also switching between test and source. Also it can echo commands into a named pipe, if you like to run your tests in separate pane/terminal.

For more details see my blog

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in