SlideShare a Scribd company logo
D Is For Driven
D Is For Driven
D Is For Driven
•
•
•
    •
    •
    •
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
• http://seshop.com/event/dev/2007/
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
http://groups.yahoo.com/group/extremeprogramming/message/113518
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
Clean code that works, in
Ron Jeffries’ pithy phrase,
is the goal of Test-Driven
   Development(TDD).
“Clean code that works”
,-*


                               ed




                                                                   Refactor
                             R


   +*
                          Green

                    (#%&')!()*                          !quot;#$
Seasar Conference
                                                                                                     15
     2006 Autumn                 © The Seasar Foundation and the others 2006. all rights reserved.
“The translation of a
  feeling into a test is a
common theme of TDD.”
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
,-*


                               ed




                                                                   Refactor
                             R


   +*
                          Green

                    (#%&')!()*                          !quot;#$
Seasar Conference
                                                                                                     15
     2006 Autumn                 © The Seasar Foundation and the others 2006. all rights reserved.
D Is For Driven
D Is For Driven
D Is For Driven
http://tech.groups.yahoo.com/group/extremeprogramming/message/113575
D Is For Driven
D Is For Driven
D Is For Driven
•

•

•
•
•
•
•
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
2006:
a testing odyssey
D Is For Driven
1971
D Is For Driven
D Is For Driven
1992
D Is For Driven
http://www.biwa.ne.jp/~mmura/SoftwareDevelopment/WhatIsSoftwareDesignJ.html
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
1998
D Is For Driven
D Is For Driven
http://www.objectclub.jp/community/XP-jp/xp_relate/testinfected-j
D Is For Driven
1999
D Is For Driven
D Is For Driven
D Is For Driven
2000
D Is For Driven
D Is For Driven
WEB+DB PRESS Vol.35   t-wada
D Is For Driven
D Is For Driven
2002
D Is For Driven
D Is For Driven
D Is For Driven
2003
D Is For Driven
D Is For Driven
2004
•   http://blogs.itmedia.co.jp/hiranabe/2005/10/
    tdd__bdd__731d.html
2005
D Is For Driven
http://giantech.jp/wiki/BDDIntro
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
class EmptyMovieList < Spec::Context
  def setup
    @list = MovieList.new
  end

  def should_have_size_of_0
    @list.size.should_equal 0
  end

  def should_not_include_star_wars
    @list.should_not_include quot;Star Warsquot;
  end
end

class OneMovieList < Spec::Context
  def setup
    ...
  def should_have_size_of_1
    ...
end
2006
http://www.dannorth.net/introducing-bdd
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
http://behaviour-driven.org/
http://behaviour-driven.org/
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
25
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
Sapir–Whorf hypothesis
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
calc_spec.rb:
context quot;1+1             quot; do
  setup do
    @sum = 1 + 1
  end

  specify quot;          2           quot; do
    @sum.should_eql 2
  end
                 expectation
end

context quot;       quot; do
  specify quot;2-0   0              quot; do
    (2 - 0).should_eql 0
  end
end
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
rspec.rubyforge.org
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
context “5        ” do
  setup do
    @five_dollar = Money.doller(5)
  end

  specify “2        10              ” do
    (@five_doller * 2).should_eql Money.doller(10)
  end

  specify “5                ” do
    @five_doller.should_not_eql 5
  end

  ...
end

...
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
D Is For Driven
•

•

•

•
Smalltalk
D Is For Driven
D Is For Driven
Do you have any questions?

More Related Content

D Is For Driven