TDD frameworks let me dream "Project Specific Language"

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    4 Favorites

    TDD frameworks let me dream "Project Specific Language" - Presentation Transcript

    1. 2009-07-07 ObjectClub 2009 Summer ( ) | Rails @ k-morohashi@esm.co.jp 2009 7 7
    2. ✓ ✓ ✓ ✓ ✓ 2009 7 7
    3. http://d.hatena.ne.jp/moro/ ✓ ✓ ✓ http://ruby.agile.esm.co.jp/ 2009 7 7
    4. http://amazon.jp/gp/product/4797336625 2009 7 7
    5. 2009 7 7
    6. 2009 7 7
    7. http://rspec.info 2009 7 7
    8. Test/ RSpec Unit Ruby 2009 7 7
    9. What? ✓ ✓ ✓ 2009 7 7
    10. http://cukes.info 2009 7 7
    11. Test/ RSpec Cucumber Unit Ruby 2009 7 7
    12. What? !"Cucumber executes plain text documentation of code against that code." ! ! 2009 7 7
    13. Cucumber RSpec Ruby ✓ ✓ ✓ 2009 7 7
    14. Test/ RSpec Cucumber Unit Ruby 2009 7 7
    15. ✓ ✓ ✓ 2009 7 7
    16. ✓ ✓ 2009 7 7
    17. ✓ ✓ ✓ ✓ ✓ 2009 7 7
    18. ✓ ✓ 2009 7 7
    19. Cucumber ✓ ✓ 2009 7 7
    20. 2009 7 7
    21. 2009 7 7
    22. ✓ ✓ 2009 7 7
    23. ✓ ✓ 2009 7 7
    24. ✓ ✓ 2009 7 7
    25. Cucumber ✓ ✓ ✓ ✓ ✓ 2009 7 7
    26. RSpec ✓ ✓ ✓ 2009 7 7
    27. describe
ProjectSpecificLanguage,
"for
depelopper"
do 

before
do 



@psl
=
ProjectSpecificLanguage.new 



@psl.use_grammar
:rspec 



@psl.defualt_vocabulary
:rspec 

end 

describe
"add
more
vocabraries"
do 



Spec::Mathers.define
:drive_development_than
do
|other| 





match
do
|actual| 







actual.communication_cost
<
other.communication_cost
&& 







actual.readability
>
other.readability 





end 



end 



before
do 





@previous
=
@psl.dup 





@psl.add_vocabularies
MyCustomMatcher.new 



end 



subject{
@psl
} 



it{
@psl.should_not
be_nil
} 



it{
should
drive_development_than(@previous)
} 

end end 2009 7 7
    28. 2009 7 7
    29. ✓ ✓ == (other) ✓acutal == other ✓ be_xxx ✓object.xxx? ✓ have(n).bars ✓object.bars.size == n ✓ raise_error ✓ Proc 2009 7 7
    30. ✓ 2009 7 7
    31. 2009 7 7
    32. ✓ ✓ 2009 7 7
    33. : subject ✓ ✓ ✓ ✓ 2009 7 7
    34. ✓ ✓ 2009 7 7
    35. ✓ ✓ 2009 7 7
    36. ✓ 2009 7 7
    37. ✓ ✓ 2009 7 7
    38. 2009 7 7
    39. ✓ ✓ ✓ ✓ 2009 7 7
    40. CustomMatcher 2009 7 7
    41. 2009 7 7
    42. CustomMatcher ✓ ✓ 2009 7 7
    43. 2009 7 7
    44. 2009 7 7
    45. RSpec ✓ ✓ ✓ ✓ ✓ 2009 7 7
    46. ✓ ✓ ✓ ✓ ✓ 2009 7 7
    47. 2009 7 7
    48. you.any?{|u| u.question? } 2009 7 7
    49. FAQ. Cuke ✓ ✓ ✓ 2009 7 7
    50. FAQ. Cuke ✓ ✓ ✓ 2009 7 7
    51. FAQ. CustomMatcher ✓ ✓ ✓ 2009 7 7
    52. 2009 7 7
    53. 2009 7 7

    + Kyosuke MOROHASHIKyosuke MOROHASHI, 4 months ago

    custom

    684 views, 4 favs, 4 embeds more stats

    Using RSpec and Cucumber, modern TDD frameworks, le more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 684
      • 450 on SlideShare
      • 234 from embeds
    • Comments 0
    • Favorites 4
    • Downloads 7
    Most viewed embeds
    • 231 views on http://d.hatena.ne.jp
    • 1 views on http://www.freerss.net
    • 1 views on https://pub.cozmixng.org
    • 1 views on http://pub.cozmixng.org

    more

    All embeds
    • 231 views on http://d.hatena.ne.jp
    • 1 views on http://www.freerss.net
    • 1 views on https://pub.cozmixng.org
    • 1 views on http://pub.cozmixng.org

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?