Skip to content

Instantly share code, notes, and snippets.

@vgrichina
Created January 20, 2011 18:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vgrichina/788370 to your computer and use it in GitHub Desktop.
Save vgrichina/788370 to your computer and use it in GitHub Desktop.
Addition {
In order to avoid silly mistakes
As a math idiot
I want to be told the sum of two numbers
Add two numbers {
Given I visit the calculator page { visit '/add' }
And I fill in '50' for 'first' { fill_in('first', 50) }
And I fill in '70' for 'Second' { fill_in('Second', 70) }
When I press 'Add' { click_button 'Add' }
Then I should see 'Answer: 120' { body.should match(/120/m) }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment