Sessions at RubyConf India 2012 about Anti-patterns andĀ Patterns

Your current filters are…

Clear

Sunday 25th March 2012

  • Smells and patterns in spec/test code

    by Sidu Ponnappa and aninda

    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

    At 1:30pm to 2:15pm, Sunday 25th March

    Coverage video