jasonm / zsh-rails-test-spec-shortcuts

zsh completion for shortcuts into rails tests/specs, most of which belongs to github.com/jferris

This URL has Read+Write access

name age message
file README Loading commit data...
directory homedir/ Mon May 18 20:28:29 -0700 2009 Adding the goods! [Jason Morrison]
README
ruby_test and .zshrc lines by Joe Ferris http://github.com/jferris
ruby_spec adapted from ruby_test by Jason Morrison http://github.com/jasonm

Add the lines in homedir/.zshrc to your .zshrc,
and then ensure that homedir/bin/ruby_test and homedir/bin/ruby_spec
are available on your path (perhaps in ~/bin).

Then, use tu/tf/ti for:

  ruby -Itest test/unit
  ruby -Itest test/functional
  ruby -Itest test/integration

and spm/spc/spv to complete:

  spec -cfs spec/models
  spec -cfs spec/views
  spec -cfs spec/controllers

like this:

  [~/dev/railsapp] $ spc a<Tab>
  admin/base_controller    admin/events_controller  application_controller

  [~/dev/railsapp] $ spc app<Tab>
  admin/base_controller    admin/events_controller  application_controller

  [~/dev/railsapp] $ spc application_controller<Enter>
  admin/base_controller    admin/events_controller  application_controller

  spec -cfs spec/ontrollers/application_controller_spec.rb # ta-da!

You can specify multiple files on a line.

ruby_spec has "spec -cfs" hardcoded as the params, which runs spec with
colors and specdoc formatting.