Adds Shoulda support to Textmate. To use all features you'll need to use my Ruby and Rails bundles (see the My Other Textmate Bundles section below)
Please Note: If you use my Rails bundle, you do not have to set Shoulda as the active bundle, you may continue to have the Rails bundle set and still gain fully shoulda support.
- Support for Shared Should an awesome extension to shoulda for DRYing your tests
- ss, ssh for share\should_ snippet and us for use\should_
- sc, scon for share\context_ snippet and uc for use\context_
- sset for share\setup_ snippet and uset for use\setup_
- ⌃⌘+S - Save share_should, share_context, share_setup (cursor should be in line of defined shared_xxx)
- ⌃⇧⌘+S - Output use_should, use_context, use_setup based on last saved item
- Updated the 'Go To Symbol' so it reads just like test output
- For shared_shoulds this means you can type when ... should ... (as you would read in the test output) in the ⇧⌘+T menu
- Added more snippets for context, should, etc.
- Improved support for running individual shoulds and contexts inside Textmate
- Context name has the same syntax coloring as method definitions (better readability)
cd ~/Library/Application\ Support/TextMate/Bundles/
git clone git://github.com/phuibonhoa/ruby-shoulda-tmbundle.git Shoulda.tmbundle
osascript -e 'tell app "TextMate" to reload bundles'
Using Spork with focus tests:
- gem install spork --pre (requires spork-0.9.rc9)
- open TextMate preferences and set environment variable SPORK_TESTUNIT=true
- initialize your app for spork (see spork README)
- open a terminal window, cd to the root of your rails app and run spork command.
- focus tests will be run through spork.
My bundles work best when use in conjunction with my other bundles:
- Rails - http://github.com/phuibonhoa/ruby-on-rails-tmbundle
- Ruby - http://github.com/phuibonhoa/ruby-tmbundle
- Shoulda - http://github.com/phuibonhoa/ruby-shoulda-tmbundle
- HAML - http://github.com/phuibonhoa/handcrafted-haml-textmate-bundle
- Sass - http://github.com/phuibonhoa/ruby-sass-tmbundle
- CTags - http://github.com/phuibonhoa/tm-ctags-tmbundle
Original bundle can be found here