Relevance, Inc.

Google
Custom Search
  • Development
  • Audits
  • Training
  • Clients
  • Open Source
  • Books
  • Jobs
  • About
  •  Blog

Test-Driven Development in Ruby (A Relevance, Inc. Training Offering)

Training > Agility

Ruby is an incredibly dynamic and flexible language, and with that dynamism comes the responsibility to test your code carefully. In this course, you will learn the basics of test- and behavior- driven development in Ruby. You will learn to use tools like rcov and flog to find problem areas in your code. You will learn how to use tests as an aid to refactoring, and how to use stubbing and mocking to break dependencies and test interactions. Finally, you will perform a refactotum to apply what you have learned to your own project code.

There are a ton of different Ruby test frameworks our there, and our instructors have experience with them all. So whether your team is using RSpec, Test::Spec, Test::Unit, Micronaut, or Cucumber, we can help you.

Course length:

2 days

Class size:

Up to 18

Supplied Materials:
  • Course CD
Prerequisites:
  • Experience in Ruby
Setup:

Students:

  • Computer with Ruby and Rails installed
  • TDD or BDD framework of student’s choice
  • Editor or IDE of student’s choice
  • Internet access

Instructor:

  • Computer with Ruby and Rails installed
  • Projector

Module Outline

1. Why Test?

  • finding problems early (and cheap)
  • getting past the excuses
  • building for today
  • engineering rigor
  • why agile works

2. XUnit Frameworks

  • tests
  • assertions
  • setup and Teardown
  • running Tests
  • writing FAIR Tests

3. BDD

  • executable documentation
  • testing at multiple levels
  • common vocabulary for all team members
  • stories
  • behaviors

4. Test Coverage

  • the need for coverage
  • types of coverage
  • running coverage reports
  • using coverage reports
  • other metrics

5. Refactoring

  • DRY code
  • intentional code
  • cohesive code
  • code smells
  • how to refactor
  • common refactorings

6. Mocking

  • isolating code with stubs
  • testing behavior with mocks
  • writing mock-friendly code
  • letting mocks improve your design
  • when it gets to be too much…

7. Refactotum

  • contributing to open source
  • working on your own code
  • using tools and metrics to find problems
  • test-driven refactoring

Muness Alrubaie leading a retrospective.

Muness Alrubaie leading a retrospective.

Photo courtesy Muness Alrubaie. Used with Permission.

200 North Mangum Street Suite 204 Durham, NC 27701
phone 919.442.3030 fax 866.577.4607 info@thinkrelevance.com

Related Links

  • interview on feedback loops 03/03/2009
  • how do you know pairing works? 02/10/2009
  • agile: from tactics to strategy 02/04/2009
  • javacript testing with screw.unit 01/31/2009
  • it's ok to break the build! 01/22/2009
  • fiveruns conversation with glenn 12/01/2008
  • glenn and josh on dynamic languages, testing 10/10/2008
 
    • About
    • Development
    • Blog
    • Audits
    • Books
    • Training
    • Jobs
    • Clients
    • Open Source
    © Copyright 2008, All Rights Reserved Relevance Inc.
  • See Us Speak
  • Contact Us
    200 North Mangum Street Suite 204 Durham, NC 27701
    phone 919.442.3030 fax 866.577.4607 info@thinkrelevance.com