Smells and patterns in test/spec code by Sidu ponnappa and Aninda Kundu
526 views · Published 20 May 2012 · 41:17 · Indexed 11 October 2026
Channel: Confreaks · 2012 · Science & Technology
The Ruby community is notable for it's whole-hearted adoption of Agile and XP, especially testing; testing is now a standard practice on the vast majority of Ruby codebases. TDD is commonly recommended because: It makes for good design, helping one create well encapsulated, decoupled production code It provides documentation for production code It minimizes regression issues and makes bugs easy to diagnose and fix What is rarely discussed is the fact that a test driven codebase exhibits patterns and smells in test code just like it does in its domain code. These test smells are as useful in identifying quality issues as are, say, violation of the law of Demeter in domain code. This talk will cover some of the common patterns and smells that a test driven codebase exhibits and their implications. Some of the patterns/smells we will cover include: The long test file The test with too many assertions The test that cannot fail The test that has logic The implementation bound test The test with arcane terminology The test that verifies program flow The slow test The test that has complex setup The test that shows high churn The test file that shows high churn
More from this channel
-
48:58
Ruby Software Continuously Delivered and Exhaustively Explained by Brian Guthrie, Srushti Ambekallu
-
40:58
Jruby Polyglot Heaven by Thomas E Enebo and Charles Oliver Nutter
-
36:46
Your tests are lying to you by Chris Parsons
-
23:46
KidsRuby: Think Of The Children! by Ron Evans
-
52:05
Resources, For Real This Time (with Webmachine) by Sean Cribbs
-
38:28
Just Say No To :nodoc: and Document Your Code! by Loren Segal
-
37:53
Scaling Ruby with Actors, or How I Learned to Stop Worrying and Love Threads by Mike Perham
-
40:10
Next Level Virtual Machine Maneuver! by Mitchell Hashimoto