Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Pragmatic TDD

j3
March 11, 2014

Pragmatic TDD

As presented at Denver.rb on 3/11/14

j3

March 11, 2014
Tweet

More Decks by j3

Other Decks in Technology

Transcript

  1. 1. Why am I building a thing? 2. How will

    it ultimately be used? 3. What would they name it? 4. What kind of inputs does it need? 5. How will I know when it works? 6. Are there edge cases? TDD Strategy
  2. 10. Run the big test.
 If it fails, go to

    (3).
 If it passes, you’re done!
  3. 1. Write a big test 2. Run the big test

    3. What’s the tiniest incremental step? 4. What are the minimal inputs? 5. What are the expected outputs? 6. Write the test 7. See it fail 8. Write an implementation 9. Run the test. If it fails, go to (8) 10. Run the big test. If it fails, go to (3), or else you’re done! TDD Tactics
  4. 1. Write a big test 2. Run the big test

    3. What’s the tiniest incremental step? 4. What are the minimal inputs? 5. What are the expected outputs? 6. Write the test 7. See it fail 8. Write an implementation 9. Run the test. If it fails, go to (8) 10. Run the big test. If it fails, go to (3) TDD Tactics
  5. 1. Why am I building a thing? 2. How will

    it ultimately be used? 3. How would they name it? 4. What kind of inputs does it need? 5. How will I know when it works? 6. Are there edge cases? TDD Strategy
  6. 1. Write a big test 2. Run the big test

    3. What’s the tiniest incremental step? 4. What are the minimal inputs? 5. What are the expected outputs? 6. Write the test 7. See it fail 8. Write an implementation 9. Run the test. If it fails, go to (8) 10. Run the big test. If it fails, go to (3), or else you’re done! TDD Tactics