xmpfilter is a small tool that can be used to
- generate Test::Unit assertions and RSpec expectations semi-automatically
- annotate source code with intermediate results (a bit like irb --simple-prompt but only for the lines explicitly marked with # =>). Very useful for example code (such as postings to ruby-talk).
As of 0.3.1, xmpfilter can generate RSpec expectations in addition to
Test::Unit assertions, as shown in this animation:

xmpfilter can be used conveniently from any decent editor (see README.vim and
README.emacs for examples). xmpfilter 0.3.1 works on win32 and
solves a couple minor bugs in 0.3.0.
Download
Get xmpfilter here.
Read more...
Read: xmpfilter 0.3.1: RSpec support, emacs love, win32 compatibility