3. Big Design Up Front
• Estimates for cost and delivery dates
• Agreement and sign-off
• Misunderstandings
• Software is Intangible
• Change is inevitable
4. “Agile” Development
• Short descriptions of each feature
• Testable and Verifiable
• Easy to understand
• Easy to manage
• Easy to prioritise
• Easy to change
5. RSpec and Behaviour Driven
Development
• Getting the words right
• It should do this
• blue.should be_darker_than(turquoise)
• Code as Specification
11. Given
• Set up pre-requisites
• Set up state
• Given a user called Dave
• And Dave is logged in
12. When
• Actions performed by the actor
• When I click the ‘profile’ link
• When I enter my new password and confirmation
• And click the ‘Change my password’ button
• Defined in terms of the user interface
13. Then
• Defines the results of your actions
• Then I should see my profile page
• And it should list how many items I have bought
• Defined in terms of the user interface
15. Test the Full-Stack
• Specify in terms of User-Interface elements
• Parse the DOM to check for results
• Defines the user interface for the customer
16. Webrat
When “Dave logs in” do
visit login_path
fill_in ‘User Name’, :with => ‘Dave’
fill_in ‘Password’, :with => ‘secret’
click_button ‘Log In’
end
17. RSpec Matchers
Then “Dave’s profile page is shown” do
response.should be_success
response.should render_template(‘profiles/show’)
response.should include_text(“Dave’s profile page”)
end
19. Process
• Write a Story
• Write the first step
• Write the specifications for the controllers
• Write the controllers
• Write the specifications for the models
• Write the models
• Run the Story
• Write the next step