September 6, 2013No Comments

Help, My Test Is Failing

xitoeyeHere's the situation. You've written your tests. You run your test suite one last time before checking in, and just when you think you are done, you see the big red F indicating test failure.

"Why Me?" you ask. "What now?"

This video discusses strategies for discovering what may have made your test fail, and for exploring what happens during the test run. If you take nothing else away from this video, learn that sometime in the next six months, there's a good chance that git bisect will save you.

If you're going to be at WindyCityRails this year, be sure to catch my talk "Rails vs. Object-Oriented Design," Fri, Sept 13, at 9am. You can also check out my books Master Space and Time With JavaScript and Trust-Driven Development.

December 28, 2012No Comments

Pragmatic Flight of Fancy in Rails Testing

A common TDD concept is that you write tests targeting the most optimal API imaginable, rather than contorting your code around current production realities. It’s possibly the most practical form of flight of fancy anyone has ever considered. Run free in a field with your API before you build retaining walls to thwart mudslides. The resulting code is much better because you work toward the best possible experience, deferring details for as long as possible. It’s amazing how well the process works in all types of contexts.

Read more

GoodFirms Badge