Cincinnati Ruby Brigade: Characterization Tests
16 April 2021

Cincinnati Ruby Brigade: Characterization Tests

During the April 2021 meeting of the Cincinnati Ruby Brigade, Gaslight’s VP of Development Tim Mecklem walks us through writing Characterization tests as a means of dealing with a legacy codebase. Big shout out to Michael Feathers and his book, “Working Effectively with Legacy Code” which lays out the foundation of Tim’s approach.

  1. Use a piece of code in a test harness (an RSpec test in our case)
  2. Write an assertion you know will fail.
  3. Let the failure tell you what the behavior is.
  4. Change the test so that it expects the behavior that the code produces.
  5. Repeat.

You can find the code here on GitHub. Watch the meeting video here:

Dealing with a legacy code base that is difficult to maintain, manage or promote? Our team can help. We should talk.

Heads up! This article may make reference to the Gaslight team—that's still us! We go by Launch Scout now, this article was just written before we re-introduced ourselves. Find out more here.

Related Posts

Want to learn more about the work we do?

Explore our work

Ready to start your software journey with us?

Contact Us