As Dr. Nic mentioned in the comments of a previous post, we’ve updated the Ruby DocTest bundle for TextMate’s syntax highlighting. It’s available at:

http://github.com/drnic/ruby-doctest-tmbundle/tree/master

The syntax highlighting looks like this:


Picture 4.png

In addition to syntax highlighting, the bundle adds a “command+shift+R” command that will quickly run your current file through the ‘rubydoctest’ tool.

Install the Ruby DocTest TextMate bundle like so:

$ cd ~/Library/Application\ Support/TextMate/
$ cd Bundles
$ git clone http://github.com/drnic/\
    ruby-doctest-tmbundle/tree/master Ruby\ DocTest.tmbundle

Reload TextMate, or choose the “Reload Bundles” option in the Bundles->Bundle Editor menu.

The next time you open a ruby (*.rb) document, you’ll need to choose “DocTest (Ruby)” as the file type in the footer of the window.