The build’s red with a test failure. You re-run the tests and suddenly all is well. What’s going on?
While Ruby makes it easy to start testing your code, it’s also easy to write tests that fail in subtle, unexpected ways. Luckily, flaky tests share common causes, and there are ways to flush them out.
From order dependencies to static state, time comparisons to threading bugs, we’ll see what’s making your test suite unstable and how to get it rock solid again.