Skip to content

pablobender/vim-mrspec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

MRSpec

A simple Vim plugin to execute RSpec through :make command.

Motivation

Run rspec inside Vim and ouptut of failing specs into quickfix window (:cwindow). Also be able to run the spec/context/describe where the cursor is.

Features/Usage

To run the nearest spec/context/describe where the cursor is.

:MRSpecLine

To run specs for the current spec file.

:MRSpecFile

To run all specs.

:MRSpecAll

To re-execute the last spec location (line, file or all). It can be called out of a spec file. Useful when you fix a failing spec in production source file.

:MRSpec

Tips

If you think the commands too long or would like another commands, just put something like below into your ~/.vimrc file.

command RL call mrspec#RunLine()
command RF call mrspec#RunFile()
command RA call mrspec#RunAll()
command R call mrspec#Run()

Now you can simple execute :RL, :RF, RA and :R to run each function, respectively.

Installation

You may install as you prefer. I like Vundle.

Put it into your Vundle configuration:

Bundle "pablobender/vim-mrspec.git"

If you use pathogen as plugin manager, just unpack or clone the repository in your ~/.vim/bundle dir (creating a subfoler, eg: ~/.vim/bundle/vim-mrspec).

But if you don't use a plugin manager, you can download the source code and put it into your ~/.vim. Make sure to put the contents of vim-mrspec folder into your ~/.vim, not create a new vim-mrspec under it.

Requirements

MRSpec is a pure vimscript plugin, but only make sense if you are working on ruby/rspec project. So you need be able to run rspec on your terminal for your project.

License

MIT

About

RSpec inside VIM with :make

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published