Your SlideShare is downloading. ×
Week7
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Week7

225
views

Published on

UWE-Ruby Week 7

UWE-Ruby Week 7


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
225
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Transcript

    • 1. RubyWeek 7
    • 2. Mid-Term Review• Not Done Grading• Overall looks pretty good• Questions??
    • 3. TESTING Agenda• Behavior Driven Development with Cucumber• Fun with MiniTest• TestUnit and Cucumber with Jeweler and Travis• Why Testing? With Nell!
    • 4. Behavior Driven Development• User Stories• Business Value• Communication• Shared Tools
    • 5. Behavior Specs• Title• Narrative• Acceptance Criteria / Scenarios / Outcomes
    • 6. • gem install cucumber• cucumber --help
    • 7. Features• Human Read/Writable description of behavior• Business Users write the features, Programmers develop the features to spec• https://github.com/cucumber/cucumber/wiki/ Feature-Introduction
    • 8. Given-When-Then• Describing your feature• Preconditions• Something happens• Expected outcome
    • 9. Step Definitions• REGEXP!!• Translation between the human narrative and the code• This type of sentence, matches to this type of code
    • 10. Demo!• I want a Celsius to Fahrenheit converter• I tell my story• I copy the generated regex• I write my tests• TDD!
    • 11. Example!• New Feature!• I’m in London and I can’t share bar stories without being able to convert Fahrenheit to Celsius• Write the Steps• Make Them Pass!
    • 12. MiniTest• Built into Ruby 1.9!• SeattleRB! (meets Tuesday nights )• Light, Fast, FUN!
    • 13. Example• Make a ruby file• Add some tests• Make them pass• All Ruby!
    • 14. Test Unit• Jeweler!• Simple testing framework• Used lots of places!
    • 15. Cucumber with Jeweler and Travis• EXAMPLE!• Add cucumber to Gemfile• Run bundler• Add feature, steps, and support (env.rb)• Add to travis.yml file
    • 16. Homework• Read Chapter 23 and 24 DuckTyping and MetaProgramming• Make the cucumber features pass