coffeescript-support/README.textile

51 lines
2.1 KiB
Plaintext
Raw Normal View History

2011-01-31 03:13:44 +00:00
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
2011-02-01 04:10:25 +00:00
I'm currently using Pathogen and am assuming you are too. That means you should be able to do:
2011-01-31 03:13:44 +00:00
2011-01-31 03:18:26 +00:00
bc. git clone git://github.com/claco/jasmine.vim.git bundle/jasmine
2011-01-31 03:13:44 +00:00
2011-02-01 04:10:25 +00:00
inside of your ~/.vim directory. If you're using submodules to track your bundles:
2011-01-31 03:13:44 +00:00
2011-01-31 03:18:26 +00:00
bc. git submodule add git://github.com/claco/jasmine.vim.git bundle/jasmine
2011-01-31 03:13:44 +00:00
git submodule init
git submodule update
h2. What it does
This plugin is pretty basic right now. It currently:
2011-02-03 04:16:17 +00:00
* Sets *Spec.js and *SpecHelper.js files to filetype=jasmine+javascript
2011-01-31 03:13:44 +00:00
* Applies basic syntax highlighting for jasmine keywords in addition to normal javascript syntax
2011-02-03 04:16:17 +00:00
* Loads snippets for the jasmine filetype for:
2011-01-31 03:13:44 +00:00
** desc: description block with before..it..expect
** before: beforeEach block
** after: afterEach block
** it: it...expect block
2011-02-03 04:16:17 +00:00
** helper: beforeEach block and addMatcher/matcher blocks for SpecHelper.js
2011-01-31 03:13:44 +00:00
** matcher: matcher block for SpecHelper.js
2011-02-01 04:10:25 +00:00
** expect: expect..to line
** spy: spyOn method
2011-02-03 04:16:17 +00:00
* Uses templates for new jasmine 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
2011-01-31 03:13:44 +00:00
h2. Running Specs
2011-02-03 04:16:17 +00:00
I'm slowly working on interactive spec running support. Currently, the Jasmine() command is provided for jasmine buffers. When invoked, it searches the current/parent directories of that buffer for the nearest Rakefile and invokes rake jasmine:ci to run all specs.
2011-02-04 04:23:41 +00:00
Jasmine buffers now have compiler set to the jasmine compiler and leader-m is mapped to run :Jasmine -> jasmine#run_tests -> :make -> rake jasmine:ci
2011-02-03 04:16:17 +00:00
I plan on adding Red/Green support, as well as quickfix error support.
2011-01-31 03:13:44 +00:00
h2. TODO
* Add commands/functions to run a spec, a spec file
2011-02-01 04:10:25 +00:00
* Add Red/Green bar to spec runner output and error buffer support
* docs help file