This saves much cut&pasting when you're posting to ruby-talk/ruby-core (I use
it all the time).

Assertion generation

xmpfilter.rb can generate assertions based on the current behavior of the code
to be tested (iow. the current behavior is assumed to be correct and is used
to generate assertions which won't be modified by further runs of
xmpfilter.rb), making it quite useful for regression testing.

Imagine you have a ComplexClass you want to test. You might start with

At this point, you want to add several assertions to verify that the values
returned by @o.size, @o.last, @o.first, @o.complex_computation and @o.last(2)
are correct. You can just write the following and feed the file to
xmpfilter in -u mode (the # => markers can also be inserted by
xmpfilter, see README.vim for more information:

You can edit the generated assertions as you want: xmpfilter will not
modify lines without the "# =>" marker. xmpfilter.rb can be used repeatedly as
you add more assertions. Imagine you want to verify that @o.last(3) raises an
ArgumentError. You can simply add one line marked with # => :