Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Feature: Addition
- In order to avoid silly mistakes
- As a math idiot
- I want to be told the sum of two numbers
- Scenario: Add two numbers
- Given I visit the calculator page
- And I fill in '50' for 'first'
- And I fill in '70' for 'Second'
- When I press 'Add'
- Then I should see 'Answer: 120'
- Given /^I visit the calculator page$/ do
- visit '/add'
- end
- Given /^I fill in '(.*)' for '(.*)'$/ do |value, field|
- fill_in(field, :with => value)
- end
- When /^I press '(.*)'$/ do |name|
- click_button(name)
- end
- Then /^I should see '(.*)'$/ do |text|
- body.should match(/#{text}/m)
- end
Add Comment
Please, Sign In to add comment