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

TDD sons

TDD sons

A presentation given for the Torino Coding Society meeting. We talked of test by try, unit testing, test driven development and, finally, behaviour driven development. Thank you @welaika!

Silvano Stralla

November 18, 2013
Tweet

Other Decks in Programming

Transcript

  1. TDD sons or: how I discovered tests, loved them since

    the first moment and changed the way I write code every day. lunedì 18 novembre 13
  2. _ I am Silvano Stralla @sistrall _ I—almost—write code for

    living, almost ruby code lunedì 18 novembre 13
  3. # https://github.com/jpfuentes2/a-letter-to-Augusta require "./love" a_letter to: Augusta do twas(only: 16.months.ago)

    { The::Universe << You.to(OurFamily) } life.has :been => %w(i n c r e d i b l y).zip(*"wonderful!").ever_since We::Wish.we_could { experience these_moments: over & over } You.will always_be: Loved, and: Cherished until Infinity.ends do; Forever.(); end end # returns “Augusta, we <3 you!” lunedì 18 novembre 13
  4. _ what we’ll do tonight _ code and try _

    code and test _ test and code _ invent and code lunedì 18 novembre 13
  5. _ gem "rspec" _ describe Number, "#valid?" do it "should

    validate" do expect(Number.new('3935664964')) .to be_valid end end _ rspec ruby_file.rb lunedì 18 novembre 13
  6. _ outside-in approach _ tests as a safety net _

    tests for legacy code lunedì 18 novembre 13
  7. _ tests won’t make you a be er dev but

    they’ll make you more confident lunedì 18 novembre 13
  8. _ then you’ll find the time to become a be

    er dev lunedì 18 novembre 13