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.

4 thoughts on “RSpec Emacs Mode

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


  2. 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.



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

    Wrong type argument: stringp, nil

Comments are closed.