Jasmine Plugin for Vim
Go to file
Christopher H. Laco 4f20bd0225 Added Jasmine() command to run rake jasmine:ci using the nearest
Rakefile for the current ft=jasmine buffer
2011-02-02 23:04:36 -05:00
autoload Added Jasmine() command to run rake jasmine:ci using the nearest 2011-02-02 23:04:36 -05:00
ftdetect Moved functions to autoload 2011-02-02 00:17:20 -05:00
ftplugin Added Jasmine() command to run rake jasmine:ci using the nearest 2011-02-02 23:04:36 -05:00
plugin Moved functions to autoload 2011-02-02 00:17:20 -05:00
snippets Make spacing consistant 2011-01-31 22:45:22 -05:00
syntax Added spy/expect snippets 2011-01-31 22:37:53 -05:00
templates Removed extra space 2011-02-02 00:21:37 -05:00
README.textile Added Jasmine() command to run rake jasmine:ci using the nearest 2011-02-02 23:04:36 -05:00

README.textile

h1. Vim Plugin for Jasmine javascript testing

This is my first attempt at a vim plugin bundle. I'm sure there are dragons in here. :-)

h2. Installation

I'm currently using Pathogen and am assuming you are too. That means you should be able to do:

bc. git clone git://github.com/claco/jasmine.vim.git bundle/jasmine

inside of your ~/.vim directory. If you're using submodules to track your bundles:

bc. git submodule add git://github.com/claco/jasmine.vim.git bundle/jasmine
git submodule init
git submodule update

h2. What it does

This plugin is pretty basic right now. It currently:

* Sets Spec.js and SpecHelper.js files to jasmine/javascript fileType
* Applies basic syntax highlighting for jasmine keywords in addition to normal javascript syntax
* Loads snippets for jasmine filetype for:
** desc: description block with before..it..expect
** before: beforeEach block
** after: afterEach block
** it: it...expect block
** helper: beforeEach block and matcher for SpecHelper.js
** matcher: matcher block for SpecHelper.js
** expect: expect..to line
** spy: spyOn method
* Uses templates for new Spec/SpecHelper buffers
* Runs all specs in jasmine:ci

You can disable templating by setting g:jasmine_use_templates=""

By default, the plugin assumes the templates are in bundle/jasmine/template and the snippets are in bundle/jasmine/snippets. You can override those by setting g:jasmine_snippets_directory and g:jasmine_templates_directory in your vimrc

h2. Running Specs

Slowly working on interactive spec running support. Currently, the Jasmine() command is provided for jasmine fileType buffers. When invoke, it searchs the curent/parent directories of that buffer for the nearest Rakefile, then invokes rake jasmine:ci to run all specs.

I plan on added Red/Green support, as well as quickfix error support.

h2. TODO

* Add commands/functions to run a spec, a spec file
* Add Red/Green bar to spec runner output and error buffer support
* docs help file