I have just updated my Shoulda snippets for the Emacs YASnippets templating package. Shoulda is a ruby-based testing framework that consists of test macros, assertions, and helpers added on to the Test::Unit ruby framework. The snippets are based, and in many cases copied from the TextMate Shoulda snippet bundle, and modified where needed to work with the YASnippets package. New features in the recently released 0.6beta of YASnippet allow support for more of the TextMate-based snippets. The new YASnippet functionality is discussed in more detail in a post I did on Emacs Blog.
In order to port many of the snippets over from the TextMate bundle I wrote a script that automates the process. There is a Python script that does something very similar. The writing of my script was more of just a code kata for me, so take a look at both. One may be more suitable for your needs.
2 comments ↓
I was just wondering, since you are an emacs and shoulda user, do you have a successful method for running focused ‘should’ tests in emacs?
I built one (along with @rmm5t) for use with the emacs-rails mode that can be found tomtt/emacs-rails fork of the emacs-rails package. However, I am now bouncing between emacs-rails-reloaded and rinari for rails development and I haven’t made or seen anything similar for those packages. I also use autotest much more now so normally my tests are rerunning automatically, so I am less likely to be running a single test.
Leave a Comment