Skip to content

Instantly share code, notes, and snippets.

@akutarba
Created October 10, 2012 15:55
Show Gist options
  • Select an option

  • Save akutarba/3866514 to your computer and use it in GitHub Desktop.

Select an option

Save akutarba/3866514 to your computer and use it in GitHub Desktop.
test_gist
Given /^I 'visit' the calculator page$/ do
visit '/add'
end
Given(/^I fill in '(.*)' for '(.*)'$/) { |value, field|
field1 = field
fill_in(field1, :with => value)
}
When /^I press '(.*)'$/ do |name|
click_button(name)
end
Then /^I should see '(.*)'$/ do |text|
body.should match(/#{text}/m)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment