Skip to content

Instantly share code, notes, and snippets.

@neaf
Created April 29, 2010 17:04
Show Gist options
  • Select an option

  • Save neaf/383891 to your computer and use it in GitHub Desktop.

Select an option

Save neaf/383891 to your computer and use it in GitHub Desktop.
Given 'account with "$email" email does not exist' do |email|
account = Account.where(:email => email).first
account.delete unless account.nil?
end
Given 'I am not logged in' do
visit "/logout"
end
When 'I go to registration form' do
visit "/register"
end
When 'I fill in "$field" field with "$value"' do |field, value|
fill_in field, :with => value
end
When 'I click "$button" button' do |button|
click_button button
end
Then 'I should see "$button" message' do |message|
page.should have_content(message)
end
Then 'I should see validation error(s)' do
within("form") do
page.should have_css("p.error")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment