RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Dealing with Test Leakage

Writing tests is always a bit finicky. That said, these frustrations grow to their awful peak whenever your suite of tests turns up indeterminate results. The classic example is when one of your normally passing tests randomly fails—even though the code hasn’t changed one iota.

Indeterminism in tests can have various causes, but in my experience the nastiest and most common cause is unaccounted-for state leakage—state leakage between tests and state leakage into tests. This article goes through the seven most likely sources of problematic test leakage.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in