Skip to navigation

Ruby Mutants

Published December 20, 2006

The over-active seattle ruby brigade released an interesting tidbit a while ago, which has only recently been thoroughly explained: Heckle.

Think of it as Dr Ruby Frankenstein.

Frankenstein's Monster Experiment II, stitches and coloring, by DerrickT

Heckle’s aim is to mutate your Ruby code and cause your unit tests to fail. If your unit tests don’t fail on the mutated code, then you’re not testing everything, and you should go directly to jail.

Heckle works by using the ParseTree and RubyToRuby libraries to grab the abstract syntax tree of methods, modify them, and evaluate the redefined method before running your tests. It can do all of this atomically, so each change can be seen individually.

Cwazy!

Thoughts

toolmantim

I’m Tim Lucas, a user experience developer currently in Sydney Australia.

I occasionally write, snap photos, present on various technical topics, tweet my going-ons, share teh codes and post tidbits to the scrapbook.

Most recently I published Simplifying ticket sales on sydneyoperahouse.com (February 16, 2010)

Work with me via Agency Rainford, or shoot an email to and say hello.

Powered by the motion of the ocean