RSpec Emacs Mode

I just released a small Emacs minor mode, rspec-mode that provides some convenience functions related to dealing with RSpec.

So far this minor mode provides some enhancements to ruby-mode in the contexts of RSpec specifications. Namely, it provides the following capabilities:

  • toggle back and forth between a spec and it’s target (bound to \C-c so)

  • verify the spec file associated with the current buffer (bound to \C-c ,)

  • verify the spec defined in the current buffer if it is a spec file (bound to \C-c ,)

  • ability to disable the example at the point (bound to \C-c sd)

  • ability to reenable the disabled example at the point (bound to \C-c se)

Try it out (download and repo details are here) and let me know if you find any problems or make any improvements.

Comments 4

  1. Steven Hansen wrote:

    Dude, you rock. I’ve been missing this feature from emacs for quite awhile.

    Thanks.

    Posted 29 Jul 2008 at 5:29 pm
  2. Marcelo de M. Serpa wrote:

    Hey Peter,

    Awesome extension, using it right now! Just a thought — would it be hard to add folding for the examples? I’m so used to folding on orgmod e files that I find myself trying to fold examples all the time :)

    Of course, I could just narrow to a region, but folding seems to be a more agile and lightweight solution.

    Cheers,

    Marcelo.

    Posted 07 Jun 2010 at 11:41 am
  3. Peter Williams wrote:

    I haven’t ever looked into how folding works in Emacs. I would happily accept a patch that implements folding. It does sound like a nice feature.

    Posted 08 Jun 2010 at 10:34 am
  4. Li Ellis Gallardo wrote:

    Im getting the following error when I type ‘\C-c ,’

    Wrong type argument: stringp, nil

    Posted 11 Apr 2011 at 10:41 am