wiki:Specky

Specky!

Specky is a small collection of  Vim functions to help make behavioral testing streamlined and easy when working with  ruby and  rspec.

Here are some of the things you can do with Specky, with a single key stroke:

  • Switch back and forth from code to testing spec
  • Run the spec, with results going to a new, syntax highlighted buffer
  • Jump quickly to spec failures and failure detail
  • View rdoc of the word under the cursor
  • Dynamically switch string types for the word under the cursor (double quoted, quoted, symbol)
  • Create comment banners quickly

Specky also includes a couple of conveniences to make your everyday programming tasks smooooth and pleasurable, such as:

  • File detection for spec files (that are named in the traditional *_spec.rb fashion.)
  • Syntax highlighting for rspec and rdoc
  • "Snippets" for rspec, for use with the  Snipmate plugin.

Downloads

You can download the latest build directly from  Vim's web site, or if you're feeling adventurous you can build it yourself from  here.

Installation

Specky requires the  VimBall packager. Install the VimBall plugin (vimscript #1502) if you don't already have it.

Then, open the specky.vba.gz file within vim, and run the following command:

 :so %

VimBall takes care of putting the files in the right locations and automatically updating the help index.

Development

You can also check out the source via  Mercurial from the following uri:

% hg clone http://code.martini.nu/vim-stuff/

Documentation

Once installed, Specky has built-in help. Access it via :help specky.

You can view a screencast of Specky, too! (Though it is of an old version, the idea is the same.)